]> granicus.if.org Git - apache/commitdiff
Allow dependencies to be generated by something other than GCC.
authorJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 19 Dec 2002 05:28:16 +0000 (05:28 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 19 Dec 2002 05:28:16 +0000 (05:28 +0000)
This allows Sun's cpp to generate valid .deps dependencies.

(This is a similar patch as applied to APR.)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98035 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
build/rules.mk.in
configure.in

diff --git a/CHANGES b/CHANGES
index 29f841ba29a67b0836e8dc6bfc4ca4a41ef63c5f..6dc7a4a561c8a742a8a08703c6d190ee3ee8518a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
 Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
+  *) Allow 'make depend' to work with non-GCC compilers.
+     [Justin Erenkrantz]
+
   *) Rename CacheMaxStreamingBuffer to MCacheMaxStreamingBuffer. Move
      implementation of MCacheMaxStreamingBuffer from mod_cache to
      mod_mem_cache. MCacheMaxStreamingBuffer now defaults to the
index e598f46d1414315dcc1f230f7b79dd3f9f1b7b80..b2f3eaff498c5ff96a9b6edc2b269c08b78029f5 100644 (file)
@@ -179,7 +179,11 @@ local-shared-build: $(SHARED_TARGETS)
 
 local-depend: x-local-depend
        if test -n "`ls $(srcdir)/*.c 2> /dev/null`"; then \
-               $(CC) -MM $(ALL_CPPFLAGS) $(ALL_INCLUDES) $(srcdir)/*.c | sed 's/\.o:/.lo:/' > $(builddir)/.deps || true;           \
+               rm -f .deps; \
+               list='$(srcdir)/*.c'; \
+               for i in $$list; do \
+                       $(MKDEP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) $$i | sed 's/\.o:/.lo:/' >> .deps; \
+               done; \
        fi
 
 local-clean: x-local-clean
index d26594354acd7f802d24bca84de6e89cd511c5e6..3fb8b074cd5eafe8d2ad105dc9309f0ee5e5e3b4 100644 (file)
@@ -243,6 +243,9 @@ AC_AIX
 AC_ISC_POSIX
 AC_MINIX
 
+dnl Check for what we can generate dependency files with
+APR_CHECK_DEPEND
+
 dnl ## Check for libraries
 
 dnl ## Check for header files