Really fix .depend
This commit is contained in:
parent
9c76b077d6
commit
d12bb5cf3c
2
mk/depend-.mk
Normal file
2
mk/depend-.mk
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# This space left intentionally blank because gmake does not load .depend
|
||||||
|
# by default
|
3
mk/depend-gmake.mk
Normal file
3
mk/depend-gmake.mk
Normal file
@ -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
|
10
mk/depend.mk
10
mk/depend.mk
@ -9,7 +9,9 @@ IGNOREFILES+= .depend
|
|||||||
|
|
||||||
depend: .depend extra_depend
|
depend: .depend extra_depend
|
||||||
|
|
||||||
# Nasty hack for gmake which does not automatically include .depend
|
# Nasty hack. depend-.mk is a blank file, depend-gmake.mk has a gmake specific
|
||||||
# if it exists, unlike every other make implementation.
|
# command to optionally include .depend.
|
||||||
INC_DEPEND= $(shell if test -e .depend; then echo ".depend"; else echo ""; fi)
|
# Someone should patch gmake to optionally include .depend if it exists.
|
||||||
include ${INC_DEPEND}
|
_INC_DEP= $(shell if ${MAKE} --version | grep -q "^GNU "; then \
|
||||||
|
echo "gmake"; else echo ""; fi)
|
||||||
|
include ${MK}/depend-${_INC_DEP}.mk
|
||||||
|
Loading…
Reference in New Issue
Block a user