]> granicus.if.org Git - apache/commitdiff
Move the generating empty deps stuff into fastgen.sh. The .deps files
authorSascha Schumann <sascha@apache.org>
Thu, 4 May 2000 20:17:22 +0000 (20:17 +0000)
committerSascha Schumann <sascha@apache.org>
Thu, 4 May 2000 20:17:22 +0000 (20:17 +0000)
are only used by Makefiles which are created by fastgen.sh, so fastgen
is the natural place to create them.

The "portable dirname" regex has been changed to remove any number of
trailing slashes. Just in case. :)

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

build/fastgen.sh
build/rules.mk

index 3dc252df089dadcb234ba5a857d579ae77a58d4f..66097e3606b98fddb46125b8cda2877166a0fe68 100755 (executable)
@@ -72,8 +72,7 @@ fi
 
 for makefile in $@; do
   echo "creating $makefile"
-# portable dirname
-  dir=`echo $makefile|sed -e 's%[^/][^/]*$%%' -e 's%/$%%'`
+  dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
   test -d "$dir/" || $mkdir_p "$dir/"
 
   (cat <<EOF
@@ -85,4 +84,6 @@ VPATH        = $top_srcdir/$dir
 EOF
 )| cat - $top_srcdir/$makefile.in > $makefile
 
+  touch "$top_builddir/$dir/.deps"
+
 done
index 98c3cfdc0b0cf7e9ccf0201ab1dbe4ad79f6dc44..6d1c8a92d5ad6e654b684b6094590a82ddb7b2f6 100644 (file)
@@ -113,7 +113,6 @@ distclean-recursive depend-recursive clean-recursive all-recursive install-recur
                        ok=yes; \
                        target="$$target-p"; \
                fi; \
-               if test ! -f $$i/.deps; then touch $$i/.deps; fi; \
                (cd $$i && $(MAKE) $$target) || exit 1; \
        done; \
        if test "$$otarget" = "all" && test -z '$(targets)'; then ok=yes; fi;\
@@ -131,7 +130,7 @@ install-p: $(targets) $(install_targets)
 distclean-p depend-p clean-p:
 
 depend: depend-recursive
-       gcc -MM $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c > $(builddir)/.deps
+       gcc -MM $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c > $(builddir)/.deps || true
 #      test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > .deps
 
 clean: clean-recursive clean-x