diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-03-07 23:32:16 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-03-07 23:32:16 +0100 |
commit | cf70b57fadfd8dd31555698308efa648848a79a3 (patch) | |
tree | 5a8b91b5ff88e9e1e02f52fd73dcf0cfeedf6587 /source4/build | |
parent | 87abb775ce9a7610341ff8f06d1c482e72e6fd6d (diff) | |
download | samba-cf70b57fadfd8dd31555698308efa648848a79a3.tar.gz samba-cf70b57fadfd8dd31555698308efa648848a79a3.tar.bz2 samba-cf70b57fadfd8dd31555698308efa648848a79a3.zip |
Use GNU make.
(This used to be commit 28aff6fafbb3d8796dd6aaac92500254cf50253e)
Diffstat (limited to 'source4/build')
-rw-r--r-- | source4/build/make/rules.mk | 16 | ||||
-rw-r--r-- | source4/build/smb_build/makefile.pm | 10 |
2 files changed, 18 insertions, 8 deletions
diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index 44277fe3e2..bce30ffc06 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -136,6 +136,22 @@ $(1): $(2) ; endef +# Shared alias +# Arguments: Target, subsystem name, alias name +define shared_module_alias_template +bin/modules/$(2)/$(3).$$(SHLIBEXT): $(1) + @ln -fs $$(<F) $$@ + +PLUGINS += bin/modules/$(2)/$(3).$$(SHLIBEXT) + +uninstallplugins:: + @-rm $$(DESTDIR)$$(modulesdir)/$(2)/$(3).$$(SHLIBEXT) +installplugins:: + @ln -fs $(1) $$(DESTDIR)$$(modulesdir)/$(2)/$(3).$$(SHLIBEXT) + + +endef + ############################################################################### # File types ############################################################################### diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 36139eca4d..bff307d775 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -141,16 +141,10 @@ sub SharedModule($$) $self->output("\$(eval \$(call shared_module_template,$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}, \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST), \$($ctx->{NAME}\_FULL_OBJ_LIST) \$($ctx->{NAME}_LINK_FLAGS)))\n"); + if (defined($ctx->{ALIASES})) { foreach (@{$ctx->{ALIASES}}) { - $self->output("$ctx->{SHAREDDIR}/$_.\$(SHLIBEXT): $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}\n"); - $self->output("\t\@ln -fs \$(<F) \$@\n"); - $self->output("PLUGINS += $ctx->{SHAREDDIR}/$_.\$(SHLIBEXT)\n"); - $self->output("\n"); - $self->output("uninstallplugins::\n"); - $self->output("\t\@-rm \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$_.\$(SHLIBEXT)\n\n"); - $self->output("installplugins::\n"); - $self->output("\t\@ln -fs $ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$_.\$(SHLIBEXT)\n\n"); + $self->output("\$(eval \$(call shared_module_alias_template,$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME},$sane_subsystem,$_))\n"); } } } |