]> granicus.if.org Git - apache/commitdiff
Rework the delete-exports target once more. Leave a comment there explaining
authorJustin Erenkrantz <jerenkrantz@apache.org>
Mon, 17 Feb 2003 01:00:50 +0000 (01:00 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Mon, 17 Feb 2003 01:00:50 +0000 (01:00 +0000)
why we have to be complicated.  (Why make's dependency code doesn't catch this,
I don't know.)

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

server/Makefile.in

index 231405181615f603641439de9ab13855a9311863..74bb1a0594440cf090da50999ac7f28cb654c006 100644 (file)
@@ -32,14 +32,22 @@ util.lo: test_char.h
 
 EXPORT_DIRS = $(top_srcdir)/include $(top_srcdir)/os/$(OS_DIR) $(APR_INCLUDEDIR) $(APU_INCLUDEDIR) $(top_srcdir)/modules/http
 
-delete-exports: export_files
+# If export_files is a dependency here, but we remove it during this stage,
+# when exports.c is generated, make will not detect that export_files is no
+# longer here and deadlock.  So, export_files can't be a dependency of
+# delete-exports.
+delete-exports:
        @if test -f exports.c; then \
-           files=`cat $?`; \
-           headers="`find $$files -newer exports.c`"; \
-           if test -n "$$headers"; then \
-               echo Found newer headers. Will rebuild exports.c.; \
-               echo rm -f exports.c export_files; \
-               rm -f exports.c export_files; \
+           if test -f export_files; then \
+               files=`cat export_files`; \
+               headers="`find $$files -newer exports.c`"; \
+               if test -n "$$headers"; then \
+                  echo Found newer headers. Will rebuild exports.c.; \
+                  echo rm -f exports.c export_files; \
+                  rm -f exports.c export_files; \
+               fi; \
+           else \
+               rm -f exports.c; \
            fi; \
        fi