ref: ff65381396b1a9615287dee92ccb00f6f0158122
parent: 76562633668bae8bc39ec29b848d42363115b321
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Sep 22 03:20:18 EDT 2017
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.
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@
cd $$pwd; \
done
-all: dep
+all:
$(FORALL)
clean:
@@ -21,6 +21,7 @@
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 @@
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
--- a/as/Makefile
+++ b/as/Makefile
@@ -18,7 +18,7 @@
$(LIBDIR)/libscc.a: $(LIB-OBJ)
cd $(LIBDIR) && $(MAKE)
-dep: ../config.mk Makefile
+dep:
./gendep.sh $(TARGETS)
touch dep
--- a/cc1/Makefile
+++ b/cc1/Makefile
@@ -21,7 +21,7 @@
$(LIBDIR)/libscc.a: $(LIB-OBJ)
cd $(LIBDIR) && $(MAKE)
-dep: ../config.mk Makefile
+dep:
./gendep.sh $(TARGETS)
touch dep
--- a/cc2/Makefile
+++ b/cc2/Makefile
@@ -16,7 +16,7 @@
mkdir -p ../rootdir/libexec/scc/
cp cc2-* ../rootdir/libexec/scc/
-dep: ../config.mk Makefile
+dep:
MKQBE=${MKQBE} ./gendep.sh $(TARGETS)
touch dep
--- a/cc2/gendep.sh
+++ b/cc2/gendep.sh
@@ -27,7 +27,7 @@
(cat Makefile
while read i
do
- if test ${MKQBE-0} -eq 1
+ if test ${MKQBE:-0} -eq 1
then
case $i in
amd64-sysv)