diff options
author | Roy Marples <roy@marples.name> | 2008-10-20 16:47:56 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-10-20 16:47:56 +0000 |
commit | d12bb5cf3c69d083b2829d0d66f31b0c3becdd64 (patch) | |
tree | 1348ec56f5c809044786f9c5044f781a569d8085 /mk | |
parent | 9c76b077d681914d462c1fe1fb53ef23eb4eb449 (diff) |
Really fix .depend
Diffstat (limited to 'mk')
-rw-r--r-- | mk/depend-.mk | 2 | ||||
-rw-r--r-- | mk/depend-gmake.mk | 3 | ||||
-rw-r--r-- | mk/depend.mk | 10 |
3 files changed, 11 insertions, 4 deletions
diff --git a/mk/depend-.mk b/mk/depend-.mk new file mode 100644 index 00000000..9d13b527 --- /dev/null +++ b/mk/depend-.mk @@ -0,0 +1,2 @@ +# This space left intentionally blank because gmake does not load .depend +# by default diff --git a/mk/depend-gmake.mk b/mk/depend-gmake.mk new file mode 100644 index 00000000..947843e1 --- /dev/null +++ b/mk/depend-gmake.mk @@ -0,0 +1,3 @@ +# Tell gmake to include the optional dependency file. +# This sucks, but I don't know any other way of portably making this work. +-include .depend diff --git a/mk/depend.mk b/mk/depend.mk index 2ae6e1e8..8e66c1cd 100644 --- a/mk/depend.mk +++ b/mk/depend.mk @@ -9,7 +9,9 @@ IGNOREFILES+= .depend depend: .depend extra_depend -# Nasty hack for gmake which does not automatically include .depend -# if it exists, unlike every other make implementation. -INC_DEPEND= $(shell if test -e .depend; then echo ".depend"; else echo ""; fi) -include ${INC_DEPEND} +# Nasty hack. depend-.mk is a blank file, depend-gmake.mk has a gmake specific +# command to optionally include .depend. +# Someone should patch gmake to optionally include .depend if it exists. +_INC_DEP= $(shell if ${MAKE} --version | grep -q "^GNU "; then \ + echo "gmake"; else echo ""; fi) +include ${MK}/depend-${_INC_DEP}.mk |