summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/build/make/rules.mk16
-rw-r--r--source4/build/smb_build/makefile.pm10
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");
}
}
}