summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/build/smb_build/input.pm2
-rw-r--r--source4/build/smb_build/makefile.pm8
-rw-r--r--source4/dynconfig.mk33
-rw-r--r--source4/param/config.mk31
4 files changed, 40 insertions, 34 deletions
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm
index f83e04f0c4..369e4aa75b 100644
--- a/source4/build/smb_build/input.pm
+++ b/source4/build/smb_build/input.pm
@@ -74,6 +74,8 @@ sub check_module($$$)
if ($mod->{OUTPUT_TYPE} eq "SHARED_LIBRARY") {
$mod->{INSTALLDIR} = "MODULESDIR/$mod->{SUBSYSTEM}";
+ push (@{$mod->{REQUIRED_SUBSYSTEMS}}, $mod->{SUBSYSTEM}) unless
+ $INPUT->{$mod->{SUBSYSTEM}}->{TYPE} eq "BINARY";
} else {
push (@{$INPUT->{$mod->{SUBSYSTEM}}{REQUIRED_SUBSYSTEMS}}, $mod->{NAME});
push (@{$INPUT->{$mod->{SUBSYSTEM}}{INIT_FUNCTIONS}}, $mod->{INIT_FUNCTION}) if defined($mod->{INIT_FUNCTION});
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 42ce3889ac..0df8ed5589 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -396,22 +396,22 @@ sub Binary($$)
if ($self->{duplicate_build}) {
$self->output(<< "__EOD__"
#
-bin/$ctx->{BINARY}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST) \$(builddir)/dynconfig-devel.o
+bin/$ctx->{BINARY}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)
\@echo Linking \$\@
\@\$(CC) \$(LDFLAGS) -o \$\@ \$(LOCAL_LINK_FLAGS) \$(INSTALL_LINK_FLAGS) \\
\$\($ctx->{TYPE}_$ctx->{NAME}_LINK_LIST) \\
- \$\($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) \$(builddir)/dynconfig-devel.o
+ \$\($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS)
__EOD__
);
}
$self->output(<< "__EOD__"
-$installdir/$ctx->{BINARY}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST) \$(builddir)/dynconfig.o
+$installdir/$ctx->{BINARY}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)
\@echo Linking \$\@
\@\$(CC) \$(LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\
\$\($ctx->{TYPE}_$ctx->{NAME}_LINK_LIST) \\
- \$\($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) \$(builddir)/dynconfig.o
+ \$\($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS)
__EOD__
);
diff --git a/source4/dynconfig.mk b/source4/dynconfig.mk
new file mode 100644
index 0000000000..3a6c4c66fb
--- /dev/null
+++ b/source4/dynconfig.mk
@@ -0,0 +1,33 @@
+[LIBRARY::DYNCONFIG]
+OBJ_FILES = dynconfig.o
+
+PATH_FLAGS = -DCONFIGFILE=\"$(CONFIGFILE)\" \
+ -DBINDIR=\"$(BINDIR)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" \
+ -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\" -DDATADIR=\"$(DATADIR)\" \
+ -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"$(SHLIBEXT)\" \
+ -DCONFIGDIR=\"$(CONFIGDIR)\" -DNCALRPCDIR=\"$(NCALRPCDIR)\" \
+ -DSWATDIR=\"$(SWATDIR)\" -DPRIVATE_DIR=\"$(PRIVATEDIR)\" \
+ -DMODULESDIR=\"$(MODULESDIR)\" -DJSDIR=\"$(JSDIR)\" \
+ -DSETUPDIR=\"$(SETUPDIR)\" -DWINBINDD_SOCKET_DIR=\"$(WINBINDD_SOCKET_DIR)\"
+
+dynconfig.o: dynconfig.c Makefile
+ @echo Compiling $<
+ @$(CC) $(CFLAGS) $(PICFLAG) $(PATH_FLAGS) -c $< -o $@
+
+# dynconfig defines used for binaries in bin/, when configure ran in developer
+# mode:
+
+DEVEL_PATH_FLAGS = -DCONFIGFILE=\"$(CONFIGFILE)\" -DBINDIR=\"$(builddir)/bin\" \
+ -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" -DLOCKDIR=\"$(LOCKDIR)\" \
+ -DPIDDIR=\"$(PIDDIR)\" -DDATADIR=\"$(srcdir)/codepages\" \
+ -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"$(SHLIBEXT)\" \
+ -DCONFIGDIR=\"$(CONFIGDIR)\" -DNCALRPCDIR=\"$(NCALRPCDIR)\" \
+ -DSWATDIR=\"$(srcdir)/../swat\" -DPRIVATE_DIR=\"$(PRIVATEDIR)\" \
+ -DMODULESDIR=\"$(builddir)/bin/modules\" \
+ -DJSDIR=\"$(srcdir)/scripting/libjs\" \
+ -DSETUPDIR=\"$(srcdir)/setup\" \
+ -DWINBINDD_SOCKET_DIR=\"$(WINBINDD_SOCKET_DIR)\"
+
+dynconfig-devel.o: dynconfig.c Makefile
+ @echo Compiling $<
+ @$(CC) $(CFLAGS) $(PICFLAG) $(DEVEL_PATH_FLAGS) -c $< -o $@
diff --git a/source4/param/config.mk b/source4/param/config.mk
index af7b98f23e..d88d0765e7 100644
--- a/source4/param/config.mk
+++ b/source4/param/config.mk
@@ -3,36 +3,7 @@ OBJ_FILES = loadparm.o \
params.o \
generic.o \
../lib/version.o
-REQUIRED_SUBSYSTEMS = LIBBASIC
+REQUIRED_SUBSYSTEMS = LIBBASIC DYNCONFIG
PRIVATE_PROTO_HEADER = proto.h
-PATH_FLAGS = -DCONFIGFILE=\"$(CONFIGFILE)\" \
- -DBINDIR=\"$(BINDIR)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" \
- -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\" -DDATADIR=\"$(DATADIR)\" \
- -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"$(SHLIBEXT)\" \
- -DCONFIGDIR=\"$(CONFIGDIR)\" -DNCALRPCDIR=\"$(NCALRPCDIR)\" \
- -DSWATDIR=\"$(SWATDIR)\" -DPRIVATE_DIR=\"$(PRIVATEDIR)\" \
- -DMODULESDIR=\"$(MODULESDIR)\" -DJSDIR=\"$(JSDIR)\" \
- -DSETUPDIR=\"$(SETUPDIR)\" -DWINBINDD_SOCKET_DIR=\"$(WINBINDD_SOCKET_DIR)\"
-dynconfig.o: dynconfig.c Makefile
- @echo Compiling $<
- @$(CC) $(CFLAGS) $(PICFLAG) $(PATH_FLAGS) -c $< -o $@
-
-# dynconfig defines used for binaries in bin/, when configure ran in developer
-# mode:
-
-DEVEL_PATH_FLAGS = -DCONFIGFILE=\"$(CONFIGFILE)\" -DBINDIR=\"$(builddir)/bin\" \
- -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" -DLOCKDIR=\"$(LOCKDIR)\" \
- -DPIDDIR=\"$(PIDDIR)\" -DDATADIR=\"$(srcdir)/codepages\" \
- -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"$(SHLIBEXT)\" \
- -DCONFIGDIR=\"$(CONFIGDIR)\" -DNCALRPCDIR=\"$(NCALRPCDIR)\" \
- -DSWATDIR=\"$(srcdir)/../swat\" -DPRIVATE_DIR=\"$(PRIVATEDIR)\" \
- -DMODULESDIR=\"$(builddir)/bin/modules\" \
- -DJSDIR=\"$(srcdir)/scripting/libjs\" \
- -DSETUPDIR=\"$(srcdir)/setup\" \
- -DWINBINDD_SOCKET_DIR=\"$(WINBINDD_SOCKET_DIR)\"
-
-dynconfig-devel.o: dynconfig.c Makefile
- @echo Compiling $<
- @$(CC) $(CFLAGS) $(PICFLAG) $(DEVEL_PATH_FLAGS) -c $< -o $@