diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-06-05 13:52:11 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:17:40 -0500 |
commit | 524f3c47cd38d4957a1fdb6ae66a7847f0deb80d (patch) | |
tree | 94cc239bee449ec17237f875352139f34195e9c2 | |
parent | 8107bdec7b451fbb980c0cc22e61501cd76545e6 (diff) | |
download | samba-524f3c47cd38d4957a1fdb6ae66a7847f0deb80d.tar.gz samba-524f3c47cd38d4957a1fdb6ae66a7847f0deb80d.tar.bz2 samba-524f3c47cd38d4957a1fdb6ae66a7847f0deb80d.zip |
r7307: Add phony rules for OUTPUT_TYPE OBJLIST, e.g. it is now possible
to do things like:
make SUBSYSTEM_NDR_RAW
(This used to be commit 2765b5a78d726ed3df177c92bc3f5efefcc78a9d)
-rw-r--r-- | source4/build/smb_build/makefile.pm | 15 | ||||
-rw-r--r-- | source4/build/smb_build/output.pm | 3 |
2 files changed, 13 insertions, 5 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index c024e1de53..71067709d3 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -87,7 +87,7 @@ sub _prepare_compiler_linker($) $output = << '__EOD__'; CC=@CC@ -CC_FLAGS=-Iinclude -I. -I$(srcdir)/include -I$(srcdir) -D_SAMBA_BUILD_ -DHAVE_CONFIG_H -Ilib @CFLAGS@ @CPPFLAGS@ +CFLAGS=-Iinclude -I. -I$(srcdir)/include -I$(srcdir) -D_SAMBA_BUILD_ -DHAVE_CONFIG_H -Ilib @CFLAGS@ @CPPFLAGS@ LD=@CC@ LD_FLAGS=@LDFLAGS@ @CFLAGS@ -Lbin @@ -194,7 +194,7 @@ bin/.dummy: dynconfig.o: dynconfig.c Makefile @echo Compiling $*.c - @$(CC) $(CC_FLAGS) @PICFLAG@ $(PATH_FLAGS) -c $< -o $@ + @$(CC) $(CFLAGS) @PICFLAG@ $(PATH_FLAGS) -c $< -o $@ @BROKEN_CC@ -mv `echo $@ | sed 's%^.*/%%g'` $@ __EOD__ @@ -233,7 +233,7 @@ sub _prepare_std_CC_rule($$$$$) # Start $comment .$src.$dst: \@echo $message \$\*.$src - \@\$(CC) \$(TARGET_CFLAGS) \$(CC_FLAGS) $flags -c \$< -o \$\@ + \@\$(CC) \$(TARGET_CFLAGS) \$(CFLAGS) $flags -c \$< -o \$\@ \@BROKEN_CC\@ -mv `echo \$\@ | sed 's%^.*/%%g'` \$\@ #End $comment ################################### @@ -405,6 +405,12 @@ $output .= add_target_flags($ctx, "library_" . $ctx->{NAME}); return $output; } +sub _prepare_objlist_rule($) +{ + my $t = shift; + return "$t->{TYPE}_$t->{NAME}: \$($t->{TYPE}_$t->{NAME}_OBJS)\n"; +} + ########################################################### # This function creates a make rule for linking a library # @@ -632,7 +638,7 @@ showlayout: showflags: @echo "Samba will be compiled with flags:" - @echo " CC_FLAGS = $(CC_FLAGS)" + @echo " CFLAGS = $(CFLAGS)" @echo " LD_FLAGS = $(LD_FLAGS)" @echo " STLD_FLAGS = $(STLD_FLAGS)" @echo " SHLD_FLAGS = $(SHLD_FLAGS)" @@ -752,6 +758,7 @@ sub _prepare_rule_lists($) foreach my $key (values %{$depend}) { next if not defined $key->{OUTPUT_TYPE}; + ($output .= _prepare_objlist_rule($key)) if $key->{OUTPUT_TYPE} eq "OBJLIST"; ($output .= _prepare_static_library_rule($key)) if $key->{OUTPUT_TYPE} eq "STATIC_LIBRARY"; ($output .= _prepare_shared_library_rule($key)) if $key->{OUTPUT_TYPE} eq "SHARED_LIBRARY"; ($output .= _prepare_binary_rule($key)) if $key->{OUTPUT_TYPE} eq "BINARY"; diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 6972817ca9..398cb31ee9 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -14,7 +14,8 @@ sub generate_objlist($) { my $subsys = shift; - $subsys->{TARGET} = $subsys->{OUTPUT} = "\$($subsys->{TYPE}_$subsys->{NAME}_OBJS)"; + $subsys->{TARGET} = "$subsys->{TYPE}_$subsys->{NAME}"; + $subsys->{OUTPUT} = "\$($subsys->{TYPE}_$subsys->{NAME}_OBJS)"; } sub generate_shared_library($) |