From 232d51e666a9a9dd65579d9c7b5873bafa9f669d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 29 Feb 2008 15:32:33 +0100 Subject: Remove useless include, simplify generated CFLAGS lines in Makefile. (This used to be commit 3157ce9876aa69de54acf3f08e0ee2b16cfaff80) --- source4/build/smb_build/makefile.pm | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'source4/build/smb_build') diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 902e8f7f42..c5cc3d3e8c 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -442,13 +442,7 @@ sub CFlags($$) my $cflags = join(' ', @cflags); - foreach (@{$key->{OBJ_LIST}}) { - my $ofile = $_; - my $dfile = $_; - $dfile =~ s/\.o$/.d/; - $dfile =~ s/\.ho$/.d/; - $self->output("$ofile $dfile: CFLAGS+= $cflags\n"); - } + $self->output("\$(patsubst %.ho,%.d,\$(key->{NAME}_OBJ_FILES:.o=.d)) \$($key->{NAME}_OBJ_FILES): CFLAGS+= $cflags\n"); } 1; -- cgit From bb176a124ee9c36a66092f9a60aa6893ad9555f9 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 25 Feb 2008 18:05:47 +0100 Subject: Move automatic dependencies code out of perl code. (This used to be commit 58a93ef94b878ff2d2d0029fc2d443551842e712) --- source4/build/smb_build/makefile.pm | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) (limited to 'source4/build/smb_build') diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index c5cc3d3e8c..26f986eacf 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -30,11 +30,6 @@ sub new($$$) $self->output("################################################\n"); $self->output("\n"); - if (!$self->{automatic_deps}) { - $self->output("ALL_PREDEP = proto\n"); - $self->output(".NOTPARALLEL:\n"); - } - return $self; } @@ -78,23 +73,17 @@ sub _prepare_mk_files($) push (@tmp, $_); } - if ($self->{gnu_make}) { - $self->output(" + $self->output(" ifneq (\$(MAKECMDGOALS),clean) ifneq (\$(MAKECMDGOALS),distclean) ifneq (\$(MAKECMDGOALS),realdistclean) "); - } - $self->output("MK_FILES = " . array2oneperline(\@tmp) . "\n"); - - if ($self->{gnu_make}) { - $self->output(" + $self->output(" endif endif endif "); - } } sub array2oneperline($) @@ -369,28 +358,6 @@ sub write($$) $self->output($self->{mkfile}); - if ($self->{automatic_deps}) { - $self->output(" -ifneq (\$(MAKECMDGOALS),clean) -ifneq (\$(MAKECMDGOALS),distclean) -ifneq (\$(MAKECMDGOALS),realdistclean) -ifneq (\$(SKIP_DEP_FILES),yes) --include \$(DEP_FILES) -endif -endif -endif -endif - -ifneq (\$(SKIP_DEP_FILES),yes) -clean:: - \@echo Removing dependency files - \@find . -name '*.d' -o -name '*.hd' | xargs rm -f -endif -"); - } else { - $self->output("include \$(srcdir)/static_deps.mk\n"); - } - open(MAKEFILE,">$file") || die ("Can't open $file\n"); print MAKEFILE $self->{output}; close(MAKEFILE); -- cgit From 7071276c65e0335386441bd2b81afeac73283808 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 16 Feb 2008 20:24:47 +0100 Subject: Simpler handling of sonameflag. (This used to be commit 1e786bb7da689c3aa435e92975f33db5a308b6a7) --- source4/build/smb_build/makefile.pm | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'source4/build/smb_build') diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 26f986eacf..52bd5ed610 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -225,31 +225,22 @@ sub SharedLibrary($$) $self->_prepare_list($ctx, "DEPEND_LIST"); $self->_prepare_list($ctx, "LINK_FLAGS"); - my $soarg = ""; - my $lns = ""; - if ($self->{config}->{SONAMEFLAG} ne "#" and defined($ctx->{LIBRARY_SONAME})) { - $soarg = "$self->{config}->{SONAMEFLAG}$ctx->{LIBRARY_SONAME}"; - if ($ctx->{LIBRARY_REALNAME} ne $ctx->{LIBRARY_SONAME}) { - $lns .= "\n\t\@test \$($ctx->{NAME}_VERSION) = \$($ctx->{NAME}_SOVERSION) || ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$ctx->{LIBRARY_SONAME}"; - } - } - - $lns .= "\nifdef $ctx->{NAME}_SOVERSION"; - $lns .= "\n\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$ctx->{LIBRARY_DEBUGNAME}"; - $lns .= "\nendif"; - $self->output(<< "__EOD__" -# $ctx->{RESULT_SHARED_LIBRARY}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST) \@echo Linking \$\@ \@mkdir -p \$(\@D) \@\$(SHLD) \$(LDFLAGS) \$(SHLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\ \$($ctx->{NAME}\_FULL_OBJ_LIST) \\ \$($ctx->{NAME}_LINK_FLAGS) \\ - $soarg$lns + \$(if \$(SONAMEFLAG), \$(SONAMEFLAG)$ctx->{LIBRARY_SONAME}) __EOD__ ); - $self->output("\n"); + if ($ctx->{LIBRARY_REALNAME} ne $ctx->{LIBRARY_SONAME}) { + $self->output("\t\@test \$($ctx->{NAME}_VERSION) = \$($ctx->{NAME}_SOVERSION) || ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$ctx->{LIBRARY_SONAME}\n"); + } + $self->output("ifdef $ctx->{NAME}_SOVERSION\n"); + $self->output("\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$ctx->{LIBRARY_DEBUGNAME}\n"); + $self->output("endif\n"); } sub MergedObj($$) -- cgit From 2bb8e49a7e8f38f053fb3d282ec62cfa4b52196e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 29 Feb 2008 15:47:04 +0100 Subject: Fix variable name. (This used to be commit b5db8defcae0a718e5239e8c7705c9bf6eb431ec) --- source4/build/smb_build/makefile.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/build/smb_build') diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 52bd5ed610..f2bff1a029 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -400,7 +400,7 @@ sub CFlags($$) my $cflags = join(' ', @cflags); - $self->output("\$(patsubst %.ho,%.d,\$(key->{NAME}_OBJ_FILES:.o=.d)) \$($key->{NAME}_OBJ_FILES): CFLAGS+= $cflags\n"); + $self->output("\$(patsubst %.ho,%.d,\$(key->{NAME}_OBJ_LIST:.o=.d)) \$($key->{NAME}_OBJ_LIST): CFLAGS+= $cflags\n"); } 1; -- cgit From 98db64734367da419877dd87d0548d93be23d483 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 29 Feb 2008 17:04:57 +0100 Subject: Remove duplicate message. (This used to be commit 87074881a926f6216276ebc263047c1ffb8aee10) --- source4/build/smb_build/main.pl | 2 -- 1 file changed, 2 deletions(-) (limited to 'source4/build/smb_build') diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl index 7312749f28..c3dc46461b 100644 --- a/source4/build/smb_build/main.pl +++ b/source4/build/smb_build/main.pl @@ -86,6 +86,4 @@ header::create_smb_build_h($OUTPUT, "include/build.h"); summary::show($OUTPUT, \%config::config); -print "To build Samba, run $config::config{MAKE}\n"; - 1; -- cgit