summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-06-26 11:51:22 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-06-26 11:51:22 +0200
commitd4172dac2c122bc2cf5f419d5687168468a9a141 (patch)
tree7ac493c04fd720da9c3a83d93f43bb4cf2272ff5 /source4/build
parent0507e03c5260dc6a1e634dffd54931beaa32b870 (diff)
downloadsamba-d4172dac2c122bc2cf5f419d5687168468a9a141.tar.gz
samba-d4172dac2c122bc2cf5f419d5687168468a9a141.tar.bz2
samba-d4172dac2c122bc2cf5f419d5687168468a9a141.zip
Use make magic for installing/uninstalling binaries.
(This used to be commit 97b724417fc8110f7c591779b0c17bd072be304f)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/make/templates.mk26
1 files changed, 7 insertions, 19 deletions
diff --git a/source4/build/make/templates.mk b/source4/build/make/templates.mk
index eb6b584af2..d4973e7dd6 100644
--- a/source4/build/make/templates.mk
+++ b/source4/build/make/templates.mk
@@ -122,32 +122,20 @@ endef
# abspath for older makes
abspath := $(shell cd $(1); pwd)
+# Install a binary
+# Arguments: path to binary to install
define binary_install_template
-inst@allbin:: $(1) installdirs
- @mkdir -p $$(DESTDIR)$$(bindir)
- @$$(SHELL) $$(srcdir)/script/installbin.sh \
- $$(INSTALLPERMS) \
- $$(DESTDIR)$$(BASEDIR) \
- $$(DESTDIR)$$(bindir) \
- $$(DESTDIR)$$(libdir) \
- $$(DESTDIR)$$(localstatedir) \
- $$<
-
+installbin:: $$(DESTDIR)$$(bindir)/$(notdir $(1))
+
uninstallbin::
+ @echo "Removing $(notdir $(1))"
@rm -f $$(DESTDIR)$$(bindir)/$(1)
endef
define sbinary_install_template
-installsbin:: $(1) installdirs
- @mkdir -p $$(DESTDIR)$$(sbindir)
- @$$(SHELL) $$(srcdir)/script/installbin.sh \
- $$(INSTALLPERMS) \
- $$(DESTDIR)$$(BASEDIR) \
- $$(DESTDIR)$$(sbindir) \
- $$(DESTDIR)$$(libdir) \
- $$(DESTDIR)$$(localstatedir) \
- $$<
+installsbin:: $$(DESTDIR)$$(sbindir)/$(notdir $(1)) installdirs
uninstallsbin::
+ @echo "Removing $(notdir $(1))"
@rm -f $$(DESTDIR)$$(sbindir)/$(1)
endef