diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-03-07 23:59:34 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-03-07 23:59:34 +0100 |
commit | 073cf999c0f167478f5c7d302e1e02ea6187e611 (patch) | |
tree | 9299db06d89185baa70456bab3244f24e9c23b0d /source4 | |
parent | cf70b57fadfd8dd31555698308efa648848a79a3 (diff) | |
download | samba-073cf999c0f167478f5c7d302e1e02ea6187e611.tar.gz samba-073cf999c0f167478f5c7d302e1e02ea6187e611.tar.bz2 samba-073cf999c0f167478f5c7d302e1e02ea6187e611.zip |
Use make macro for module installation.
(This used to be commit 45d252fd9b3df4f1221a23cece78b673a55dfc7c)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/build/make/rules.mk | 11 | ||||
-rw-r--r-- | source4/build/smb_build/makefile.pm | 8 |
2 files changed, 12 insertions, 7 deletions
diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index bce30ffc06..6bb9247df8 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -152,6 +152,17 @@ installplugins:: endef +define shared_module_install_template +installplugins:: bin/modules/$(1)/$(2) + @echo Installing$(2) as $$(DESTDIR)$$(modulesdir)/$(1)/$(2) + @mkdir -p $$(DESTDIR)$$(modulesdir)/$(1)/ + @cp bin/modules/$(1)/$(2) $$(DESTDIR)$$(modulesdir)/$(1)/$(2) +uninstallplugins:: + @echo Uninstalling $$(DESTDIR)$$(modulesdir)/$(1)/$(2) + @-rm $$(DESTDIR)$$(modulesdir)/$(1)/$(2) + +endef + ############################################################################### # File types ############################################################################### diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index bff307d775..6d879ff02b 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -122,13 +122,7 @@ sub SharedModule($$) $sane_subsystem =~ s/^lib//; $self->output("PLUGINS += $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}\n"); - $self->output("installplugins:: $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}\n"); - $self->output("\t\@echo Installing $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} as \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"); - $self->output("\t\@mkdir -p \$(DESTDIR)\$(modulesdir)/$sane_subsystem/\n"); - $self->output("\t\@cp $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"); - $self->output("uninstallplugins::\n"); - $self->output("\t\@echo Uninstalling \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"); - $self->output("\t\@-rm \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"); + $self->output("\$(eval \$(call shared_module_install_template,$sane_subsystem, $ctx->{LIBRARY_REALNAME}))\n"); $self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n"); $self->_prepare_list($ctx, "FULL_OBJ_LIST"); |