commit d325a0554a3098a01f317f54a46643827c1f777d
parent b60bdeb331fcf86b6be8023a3d17efab4b541427
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Fri, 22 Sep 2017 07:20:18 +0200
Simplify Makefiles
Remove dep file and go ahead always with dependencies generation.
We don't support build that didn't executed make dep in the top
Makefile.
Diffstat:
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
@@ -12,7 +12,7 @@ FORALL = @set -e ;\
cd $$pwd; \
done
-all: dep
+all:
$(FORALL)
clean:
@@ -21,6 +21,7 @@ clean:
distclean:
touch config.mk # we need config.mk for makes in $DIRS
+ find . -name makefile | xargs rm -f
$(FORALL)
rm -f dep
rm -rf rootdir
@@ -32,9 +33,8 @@ config.mk:
sed -n '/^# '`uname`'/,/^$$/p' system.mk) > $$.mk && \
mv $$.mk config.mk
-dep: config.mk system.mk
+dep: config.mk
$(FORALL)
- touch dep
tests: all
cd tests && $(MAKE) -e all
diff --git a/as/Makefile b/as/Makefile
@@ -18,7 +18,7 @@ as: $(OBJ)
$(LIBDIR)/libscc.a: $(LIB-OBJ)
cd $(LIBDIR) && $(MAKE)
-dep: ../config.mk Makefile
+dep:
./gendep.sh $(TARGETS)
touch dep
diff --git a/cc1/Makefile b/cc1/Makefile
@@ -21,7 +21,7 @@ all:
$(LIBDIR)/libscc.a: $(LIB-OBJ)
cd $(LIBDIR) && $(MAKE)
-dep: ../config.mk Makefile
+dep:
./gendep.sh $(TARGETS)
touch dep
diff --git a/cc2/Makefile b/cc2/Makefile
@@ -16,7 +16,7 @@ all:
mkdir -p ../rootdir/libexec/scc/
cp cc2-* ../rootdir/libexec/scc/
-dep: ../config.mk Makefile
+dep:
MKQBE=${MKQBE} ./gendep.sh $(TARGETS)
touch dep
diff --git a/cc2/gendep.sh b/cc2/gendep.sh
@@ -27,7 +27,7 @@ sort -u |
(cat Makefile
while read i
do
- if test ${MKQBE-0} -eq 1
+ if test ${MKQBE:-0} -eq 1
then
case $i in
amd64-sysv)