diff options
author | Justin Erenkrantz <jerenkrantz@apache.org> | 2002-04-22 01:24:51 +0000 |
---|---|---|
committer | Justin Erenkrantz <jerenkrantz@apache.org> | 2002-04-22 01:24:51 +0000 |
commit | 8f30b28fdfc018962725b1c3f1fb2932e8369d8b (patch) | |
tree | 544a59affb9a1ed79c8e9f5d1b32f3caa6e63f9b /build | |
parent | ce55714d92a3fc23298a4de2afeb15562f8e1c8e (diff) | |
download | apr-8f30b28fdfc018962725b1c3f1fb2932e8369d8b.tar.gz |
Allow VPATH builds to properly generate build dependencies. This requires
srcdir to always be available in a Makefile, so we need to stop adding
this only when we use VPATH.
Change the dependency generation to use .deps instead of appending to
the Makefile. This makes us consistent with the dependency style of
httpd-2.0.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63286 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build')
-rw-r--r-- | build/Makefile.in | 3 | ||||
-rw-r--r-- | build/rules.mk.in | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/build/Makefile.in b/build/Makefile.in index c486d6941..ee1e6b58d 100644 --- a/build/Makefile.in +++ b/build/Makefile.in @@ -1,3 +1,6 @@ +srcdir = @srcdir@ +VPATH = @srcdir@ + TARGETS= INCLUDES= DISTCLEAN_TARGETS = rules.mk diff --git a/build/rules.mk.in b/build/rules.mk.in index 26e5241b0..7a670160e 100644 --- a/build/rules.mk.in +++ b/build/rules.mk.in @@ -195,10 +195,9 @@ local-extraclean: local-distclean x-local-extraclean local-all: $(TARGETS) local-depend: x-local-depend - @if test -n "`ls *.c 2> /dev/null`"; then \ - echo $(MKDEP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) *.c ; \ - CC=${CC} $(MKDEP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) *.c ; \ - fi + @if test -n "`ls $(srcdir)/*.c 2> /dev/null`"; then \ + $(CC) -MM $(ALL_CPPFLAGS) $(ALL_INCLUDES) $(srcdir)/*.c | sed 's/\.o:/.lo:/' > .deps || true; \ + fi # to be filled in by the actual Makefile x-local-depend x-local-clean x-local-distclean x-local-extraclean: |