summaryrefslogtreecommitdiff
path: root/source4/build/smb_build/makefile.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-12-23 13:02:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:41 -0500
commit1ac5c35ed9bf5f557b8f42eee9c392af353430fe (patch)
tree7b80f946fc3ad04e8050d8398af21ac254f3b44a /source4/build/smb_build/makefile.pm
parent69a694d7ba3a8cd90445838e8a3f7d409e55fe24 (diff)
downloadsamba-1ac5c35ed9bf5f557b8f42eee9c392af353430fe.tar.gz
samba-1ac5c35ed9bf5f557b8f42eee9c392af353430fe.tar.bz2
samba-1ac5c35ed9bf5f557b8f42eee9c392af353430fe.zip
r12450: Move generation of proto and full object lists to makefile.pm. 'make' now
handles expanding the protoheader object list, rather then the build system, which makes the makefile quite a bit shorter. (This used to be commit a4088ccc704f1338c040c53596ff606cc1651d03)
Diffstat (limited to 'source4/build/smb_build/makefile.pm')
-rw-r--r--source4/build/smb_build/makefile.pm34
1 files changed, 33 insertions, 1 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 6aa3e02e5c..b7a6ace404 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -247,6 +247,12 @@ sub SharedLibrary($$)
$self->_prepare_list($ctx, "LINK_LIST");
$self->_prepare_list($ctx, "LINK_FLAGS");
+ push(@{$self->{all_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)");
+
+ if ($ctx->{NOPROTO} eq "NO") {
+ push(@{$self->{proto_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST\)");
+ }
+
$self->output(<< "__EOD__"
#
@@ -284,6 +290,12 @@ sub MergedObj($$)
$self->_prepare_list($ctx, "CFLAGS");
$self->_prepare_list($ctx, "DEPEND_LIST");
+ push(@{$self->{all_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)");
+
+ if ($ctx->{NOPROTO} eq "NO") {
+ push(@{$self->{proto_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST\)");
+ }
+
$self->output("$ctx->{TARGET}: \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)\n");
$self->output("\t\@echo \"Pre-Linking $ctx->{TYPE} $ctx->{NAME}\"\n");
@@ -297,6 +309,12 @@ sub ObjList($$)
return unless $ctx->{TARGET};
+ push(@{$self->{all_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)");
+
+ if ($ctx->{NOPROTO} eq "NO") {
+ push(@{$self->{proto_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST\)");
+ }
+
$self->_prepare_list($ctx, "OBJ_LIST");
$self->_prepare_list($ctx, "CFLAGS");
$self->_prepare_list($ctx, "DEPEND_LIST");
@@ -318,6 +336,12 @@ sub StaticLibrary($$)
$self->_prepare_list($ctx, "LINK_LIST");
$self->_prepare_list($ctx, "LINK_FLAGS");
+ push(@{$self->{all_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)");
+
+ if ($ctx->{NOPROTO} eq "NO") {
+ push(@{$self->{proto_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST\)");
+ }
+
$self->output(<< "__EOD__"
#
$ctx->{TARGET}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST) bin/.dummy
@@ -350,6 +374,12 @@ sub Binary($$)
$installdir = "bin";
}
+ push(@{$self->{all_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)");
+
+ if ($ctx->{NOPROTO} eq "NO") {
+ push(@{$self->{proto_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST\)");
+ }
+
unless (defined($ctx->{INSTALLDIR})) {
} elsif ($ctx->{INSTALLDIR} eq "SBINDIR") {
push (@{$self->{sbin_progs}}, "$installdir/$ctx->{BINARY}");
@@ -447,13 +477,15 @@ sub write($$)
$self->output("SHARED_LIBS = " . array2oneperline($self->{shared_libs}) . "\n");
$self->output("PUBLIC_HEADERS = " . array2oneperline($self->{headers}) . "\n");
$self->output("PC_FILES = " . array2oneperline($self->{pc_files}) . "\n");
+ $self->output("ALL_OBJS = " . array2oneperline($self->{all_objs}) . "\n");
+ $self->output("PROTO_OBJS = " . array2oneperline($self->{proto_objs}) . "\n");
$self->_prepare_mk_files();
if ($self->{developer}) {
$self->output(<<__EOD__
-#-include \$(_ALL_OBJS_OBJ_LIST:.o=.d)
+#-include \$(ALL_OBJS:.o=.d)
IDL_FILES = \$(wildcard librpc/idl/*.idl)
\$(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_%.c,\$(IDL_FILES)) \\
\$(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_\%_c.c,\$(IDL_FILES)) \\