Skip to content

Commit 938663d

Browse files
committed
wip
1 parent 2dae956 commit 938663d

3 files changed

Lines changed: 51 additions & 9 deletions

File tree

ext/Makefile

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ include ./c4core.mk
55
C4CORE_SRC := $(shell cat c4core.src.txt)
66
# c4core files used by ryml in dev builds (debug/test)
77
C4CORE_DEV := $(shell cat c4core.dev.txt)
8+
# c4proj files
9+
C4CORE_PROJ := $(shell cat c4core.proj.txt)
810

11+
C4PROJ_DIR = ../proj/c4proj
912
C4CORE_DIR_SRC = c4core.src
1013
C4CORE_DIR_DEV = c4core.dev
1114
C4CORE_DIR_GIT = c4core
@@ -14,58 +17,82 @@ C4CORE_DIR_PROJ = $(C4CORE_DIR_GIT)/src
1417

1518
C4CORE_INPUT_SRC = $(C4CORE_SRC:%=$(C4CORE_DIR_PROJ)/%)
1619
C4CORE_INPUT_DEV = $(C4CORE_DEV:%=$(C4CORE_DIR_PROJ)/%)
20+
C4CORE_INPUT_PROJ = $(C4CORE_DEV:%=$(CORE_DIR_PROJ)/cmake/%)
1721

1822
C4CORE_OUTPUT_SRC = $(C4CORE_SRC:%=$(C4CORE_DIR_SRC)/%)
1923
C4CORE_OUTPUT_DEV = $(C4CORE_DEV:%=$(C4CORE_DIR_DEV)/%)
24+
C4CORE_OUTPUT_PROJ = $(C4CORE_PROJ:%=$(C4PROJ_DIR)/%)
2025

2126

2227
c4core-check: c4core-check-sync c4core-check-list c4core-clone-check
23-
c4core-check-sync: c4core-check-sync-src c4core-check-sync-dev
24-
c4core-check-list: c4core-check-list-src c4core-check-list-dev
28+
c4core-check-sync: c4core-check-sync-src c4core-check-sync-dev c4core-check-sync-proj
29+
c4core-check-list: c4core-check-list-src c4core-check-list-dev c4core-check-list-proj
2530
c4core-check-sync-src: c4core-clone
2631
@echo "check c4core list src..."
27-
@set -e ; \
32+
set -e ; \
2833
for s in $(C4CORE_SRC); do \
2934
( $(COLORDIFF) -u $(C4CORE_DIR_PROJ)/$$s $(C4CORE_DIR_SRC)/$$s ) ; \
3035
done
3136
@echo "check c4core sync src: PASS"
3237
c4core-check-sync-dev: c4core-clone
3338
@echo "check c4core list dev..."
34-
@set -e ; \
39+
set -e ; \
3540
for s in $(C4CORE_DEV); do \
3641
( $(COLORDIFF) -u $(C4CORE_DIR_PROJ)/$$s $(C4CORE_DIR_DEV)/$$s ) ; \
3742
done
3843
@echo "check c4core sync dev: PASS"
44+
c4core-check-sync-proj: c4core-clone
45+
@echo "check c4core list proj..."
46+
set -e ; \
47+
for s in $(C4CORE_PROJ); do \
48+
( $(COLORDIFF) -u $(C4CORE_DIR_GIT)/cmake/$$s $(C4PROJ_DIR)/$$s ) ; \
49+
done
50+
@echo "check c4core sync proj: PASS"
3951
c4core-check-list-src: c4core-clone
4052
@echo "check c4core list src..."
4153
$(COLORDIFF) -u \
4254
<(cat c4core.src.txt | sort) \
43-
<(cd c4core.src ; find . ! -type d | sed s:\./c4:c4:g | sort)
55+
<(cd $(C4CORE_DIR_SRC) ; find . ! -type d | sed s:\./c4:c4:g | sort)
4456
@echo "check c4core list src: PASS"
4557
c4core-check-list-dev: c4core-clone
4658
@echo "check c4core list dev..."
4759
$(COLORDIFF) -u \
4860
<(cat c4core.dev.txt | sort) \
49-
<(cd c4core.dev ; find . ! -type d | sed s:\./c4:c4:g | sort)
61+
<(cd $(C4CORE_DIR_DEV) ; find . ! -type d | sed s:\./c4:c4:g | sort)
5062
@echo "check c4core list dev: PASS"
63+
c4core-check-list-proj: c4core-clone
64+
@echo "check c4core list proj..."
65+
set -eo pipefail ; \
66+
cd $(C4PROJ_DIR) ; \
67+
existing_files="$$(find . ! -type d | sed s:^\./::g | sort)" ; \
68+
for s in $(C4CORE_PROJ); do \
69+
echo "$$existing_files" | grep "^$$s$$" >/dev/null || echo "missing: $$s"; \
70+
done ; \
71+
cd -
72+
@echo "check c4core list proj: PASS"
5173

5274

53-
c4core-import: c4core-import-src c4core-import-dev
54-
c4core-export: c4core-export-src c4core-export-dev
75+
c4core-import: c4core-import-src c4core-import-dev c4core-import-proj
76+
c4core-export: c4core-export-src c4core-export-dev c4core-export-proj
5577

5678
c4core-import-src: $(C4CORE_INPUT_SRC)
5779
$(call mk_safe_sync,$(C4CORE_SRC),$(C4CORE_DIR_PROJ),$(C4CORE_DIR_SRC))
5880
c4core-import-dev: $(C4CORE_INPUT_DEV)
5981
$(call mk_safe_sync,$(C4CORE_DEV),$(C4CORE_DIR_PROJ),$(C4CORE_DIR_DEV))
82+
c4core-import-proj: $(C4CORE_INPUT_PROJ)
83+
$(call mk_safe_sync,$(C4CORE_PROJ),$(CORE_DIR_PROJ)/cmake,$(C4PROJ_DIR))
6084

6185
c4core-export-src: $(C4CORE_OUTPUT_SRC)
6286
$(call mk_safe_sync,$(C4CORE_SRC),$(C4CORE_DIR_SRC),$(C4CORE_DIR_PROJ))
6387
c4core-export-dev: $(C4CORE_OUTPUT_DEV)
6488
$(call mk_safe_sync,$(C4CORE_DEV),$(C4CORE_DIR_DEV),$(C4CORE_DIR_PROJ))
89+
c4core-export-proj: $(C4CORE_OUTPUT_PROJ)
90+
$(call mk_safe_sync,$(C4CORE_PROJ),$(C4PROJ_DIR),$(CORE_DIR_PROJ)/cmake)
6591

6692

6793
$(C4CORE_INPUT_SRC): c4core-clone
6894
$(C4CORE_INPUT_DEV): c4core-clone
95+
$(C4CORE_INPUT_PROJ): c4core-clone
6996

7097
$(C4CORE_DIR_GIT):
7198
$(call mk_git_clone,$(C4CORE_DIR_GIT),$(C4CORE_TAG),"$(C4CORE_REPO)")

ext/c4core.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
C4CORE_REPO := https://github.com/biojppm/c4core
44
# must be tag or a FULL commit hash; cannot be a branch name.
5-
C4CORE_TAG := v0.11.1
5+
C4CORE_TAG := v0.2.11

ext/c4core.proj.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
amalgamate_utils.py
2+
c4CatSources.cmake
3+
c4Doxygen.cmake
4+
c4GetTargetPropertyRecursive.cmake
5+
c4Project.cmake
6+
c4StaticAnalysis.cmake
7+
compat/c4/gcc-4.8.hpp
8+
compat/gtest_gcc-4.8.patch
9+
ConfigurationTypes.cmake
10+
CreateSourceGroup.cmake
11+
GetFlags.cmake
12+
PatchUtils.cmake
13+
PrintVar.cmake
14+
PVS-Studio.cmake
15+
TargetArchitecture.cmake

0 commit comments

Comments
 (0)