This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Pass in to makedepend the name(s) of files that all objects depend on.
authorNicholas Clark <nick@ccl4.org>
Wed, 15 May 2013 17:40:46 +0000 (19:40 +0200)
committerNicholas Clark <nick@ccl4.org>
Mon, 20 May 2013 19:50:45 +0000 (21:50 +0200)
Makefile.SH
makedepend.SH
x2p/Makefile.SH

index 91ad66a..9219785 100755 (executable)
@@ -1406,7 +1406,7 @@ config.h: config_h.SH config.sh
 
 .PHONY: depend
 depend: makedepend
-       sh ./makedepend MAKE=$(MAKE)
+       sh ./makedepend MAKE=$(MAKE) cflags
 
 # Cannot postpone this until $firstmakefile is ready ;-)
 makedepend: makedepend.SH config.sh
index 0c3cf18..3ea3a3e 100755 (executable)
@@ -39,7 +39,7 @@ mkdir .depending
 # This script should be called with 
 #     sh ./makedepend MAKE=$(MAKE)
 case "$1" in 
-       MAKE=*) eval $1 ;;
+       MAKE=*) eval $1; shift ;;
 esac
 
 export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh \$0; kill \$\$)
@@ -206,7 +206,7 @@ for file in `$cat .clist`; do
            -e 's|\.c\.c|.c|' $uwinfix .cout .cerr| \
         $uniq | $sort | $uniq >> .deptmp
     fi
-    echo "$filebase\$(OBJ_EXT): cflags" >> .deptmp
+    echo "$filebase\$(OBJ_EXT): $@" >> .deptmp
 done
 
 $sed <$mf >$mf.new -e '1,/^# AUTOMATICALLY/!d'
index 55d338f..e5a3c94 100755 (executable)
@@ -170,7 +170,7 @@ lint:
        lint $(lintflags) $(defs) $(c) > a2p.fuzz
 
 depend: ../makedepend
-       sh ../makedepend MAKE=$(MAKE)
+       sh ../makedepend MAKE=$(MAKE) cflags
 
 clist:
        echo $(c) | tr ' ' $(TRNL) >.clist