diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-09-16 14:08:08 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:06:48 -0500 |
commit | d6c66ea7746a18428cf85af5639ec562ce024dd2 (patch) | |
tree | 50398e8db71b2f3ec4a30b61349b0a3eb9e031cc | |
parent | ab36db2f9d2341a5206584e2d74000515f0b08a0 (diff) | |
download | samba-d6c66ea7746a18428cf85af5639ec562ce024dd2.tar.gz samba-d6c66ea7746a18428cf85af5639ec562ce024dd2.tar.bz2 samba-d6c66ea7746a18428cf85af5639ec562ce024dd2.zip |
r25187: pass FIRST_PREREQ to Makefile so that the value can be used
in handwritten rules too, hopefully fix the build
of ldb with bsd make.
metze
(This used to be commit 9d6d296105526c55f08d82d289a30b92193d51e3)
-rw-r--r-- | source4/build/smb_build/makefile.pm | 16 | ||||
-rw-r--r-- | source4/dynconfig.mk | 3 | ||||
-rw-r--r-- | source4/lib/ldb/config.mk | 6 |
3 files changed, 13 insertions, 12 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 39ae54bba7..98b7e41306 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -114,17 +114,19 @@ sub _prepare_suffix_rules($) } $self->output(<< "__EOD__" +FIRST_PREREQ = $first_prereq + # Dependencies command DEPENDS = \$(CC) -M -MG -MP -MT \$(<:.c=.o) -MT \$@ \\ `\$(PERL) \$(srcdir)/script/cflags.pl \$@` \\ - \$(CFLAGS) $first_prereq -o \$@ + \$(CFLAGS) \$(FIRST_PREREQ) -o \$@ # Dependencies for host objects HDEPENDS = \$(CC) -M -MG -MP -MT \$(<:.c=.ho) -MT \$@ \\ `\$(PERL) \$(srcdir)/script/cflags.pl \$@` \\ - \$(HOSTCC_CFLAGS) $first_prereq -o \$@ + \$(HOSTCC_CFLAGS) \$(FIRST_PREREQ) -o \$@ # Dependencies for precompiled headers PCHDEPENDS = \$(CC) -M -MG -MT include/includes.h.gch -MT \$@ \\ - \$(CFLAGS) $first_prereq -o \$@ + \$(CFLAGS) \$(FIRST_PREREQ) -o \$@ # \$< is broken in older BSD versions: # when \$@ is foo/bar.o, \$< could be torture/foo/bar.c @@ -136,20 +138,20 @@ PCHDEPENDS = \$(CC) -M -MG -MT include/includes.h.gch -MT \$@ \\ # Run a static analysis checker CHECK = \$(CC_CHECKER) `\$(PERL) \$(srcdir)/script/cflags.pl \$@` \\ - \$(CFLAGS) \$(PICFLAG) -c $first_prereq -o \$@ + \$(CFLAGS) \$(PICFLAG) -c \$(FIRST_PREREQ) -o \$@ # Run the configured compiler COMPILE = \$(CC) `\$(PERL) \$(srcdir)/script/cflags.pl \$@` \\ - \$(CFLAGS) \$(PICFLAG) -c $first_prereq -o \$@ + \$(CFLAGS) \$(PICFLAG) -c \$(FIRST_PREREQ) -o \$@ # Run the compiler for the build host HCOMPILE = \$(HOSTCC) `\$(PERL) \$(srcdir)/script/cflags.pl \$@` \\ - \$(HOSTCC_CFLAGS) -c $first_prereq -o \$@ + \$(HOSTCC_CFLAGS) -c \$(FIRST_PREREQ) -o \$@ # Precompile headers PCHCOMPILE = @\$(CC) -Ilib/replace \\ `\$(PERL) \$(srcdir)/script/cflags.pl \$@` \\ - \$(CFLAGS) \$(PICFLAG) -c $first_prereq -o \$@ + \$(CFLAGS) \$(PICFLAG) -c \$(FIRST_PREREQ) -o \$@ __EOD__ ); diff --git a/source4/dynconfig.mk b/source4/dynconfig.mk index b86f441372..1840ededac 100644 --- a/source4/dynconfig.mk +++ b/source4/dynconfig.mk @@ -21,4 +21,5 @@ PATH_FLAGS = -DCONFIGFILE=\"$(CONFIGFILE)\" \ dynconfig.o: dynconfig.c Makefile @echo Compiling $< - @$(CC) `$(PERL) $(srcdir)/script/cflags.pl $@` $(CFLAGS) $(PICFLAG) $(PATH_FLAGS) -c $< -o $@ + @$(CC) `$(PERL) $(srcdir)/script/cflags.pl $@` $(CFLAGS) $(PICFLAG) \ + $(PATH_FLAGS) -c $(FIRST_PREREQ) -o $@ diff --git a/source4/lib/ldb/config.mk b/source4/lib/ldb/config.mk index 6ac57d05f2..d66c958fc0 100644 --- a/source4/lib/ldb/config.mk +++ b/source4/lib/ldb/config.mk @@ -123,19 +123,17 @@ PRIVATE_DEPENDENCIES = \ # End MODULE ldb_tdb ################################################ -# NOTE: this rule is broken for some systems when $builddir != $srcdir because -# it hardcodes the use of $<. See smb_build/makefile.pm. ./lib/ldb/common/ldb_modules.o: lib/ldb/common/ldb_modules.c Makefile @echo Compiling $< @$(CC) `$(PERL) $(srcdir)/script/cflags.pl $@` $(CFLAGS) $(PICFLAG) \ -DSHLIBEXT=\"$(SHLIBEXT)\" \ - -c $< -o $@ + -c $(FIRST_PREREQ) -o $@ ./lib/ldb/common/ldb.o: lib/ldb/common/ldb.c Makefile @echo Compiling $< @$(CC) `$(PERL) $(srcdir)/script/cflags.pl $@` $(CFLAGS) $(PICFLAG) \ -DLDB_MODULESDIR=\"$(MODULESDIR)/ldb\" \ - -c $< -o $@ + -c $(FIRST_PREREQ) -o $@ ################################################ |