diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-06-27 12:03:23 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-06-27 12:03:23 +1000 |
commit | 7a295c66c056bc6eeb26d2176584fff4152b90b8 (patch) | |
tree | 6d18c2cb68f89f36e8085689e282fbf1cbc3e95f /source4/build/make/templates.mk | |
parent | 1e36856ae50762ebad2d16e81b7ad604509b0d52 (diff) | |
parent | d4172dac2c122bc2cf5f419d5687168468a9a141 (diff) | |
download | samba-7a295c66c056bc6eeb26d2176584fff4152b90b8.tar.gz samba-7a295c66c056bc6eeb26d2176584fff4152b90b8.tar.bz2 samba-7a295c66c056bc6eeb26d2176584fff4152b90b8.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-local
(This used to be commit 9607e79c3db9743617397c347bb69f87f6525801)
Diffstat (limited to 'source4/build/make/templates.mk')
-rw-r--r-- | source4/build/make/templates.mk | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/source4/build/make/templates.mk b/source4/build/make/templates.mk index 41a7ccd0a5..d4973e7dd6 100644 --- a/source4/build/make/templates.mk +++ b/source4/build/make/templates.mk @@ -22,6 +22,12 @@ define binary_link_template $(1): $(2) ; @echo Linking $$@ @$$(BNLD) $$(BNLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) $(3) + +clean:: + @rm -f $(1) + +binaries:: $(1) + endef # Link a host-machine binary @@ -30,6 +36,12 @@ define host_binary_link_template $(1): $(2) ; @echo Linking $$@ @$$(HOSTLD) $$(HOSTLD_FLAGS) -L$${builddir}/bin/static -o $$@ $$(INSTALL_LINK_FLAGS) $(3) + +clean:: + rm -f $(1) + +binaries:: $(1) + endef # Create a prototype header @@ -106,3 +118,24 @@ uninstallplugins:: @-rm $$(DESTDIR)$$(modulesdir)/$(1)/$(2) endef + +# abspath for older makes +abspath := $(shell cd $(1); pwd) + +# Install a binary +# Arguments: path to binary to install +define binary_install_template +installbin:: $$(DESTDIR)$$(bindir)/$(notdir $(1)) + +uninstallbin:: + @echo "Removing $(notdir $(1))" + @rm -f $$(DESTDIR)$$(bindir)/$(1) +endef + +define sbinary_install_template +installsbin:: $$(DESTDIR)$$(sbindir)/$(notdir $(1)) installdirs + +uninstallsbin:: + @echo "Removing $(notdir $(1))" + @rm -f $$(DESTDIR)$$(sbindir)/$(1) +endef |