From e624266136daec4bc65fb357186e7bbe5bbe87d3 Mon Sep 17 00:00:00 2001 From: Loïc Minier Date: Sat, 30 Jan 2010 16:39:58 +0100 Subject: Use make vars to install examples subdirs too --- Makefile | 101 +++++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 73 insertions(+), 28 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 00082a5..45c83bc 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,11 @@ BINDIR := $(DESTDIR)/usr/bin PKGLIBDIR := $(DESTDIR)/usr/lib/pbuilder SBINDIR := $(DESTDIR)/usr/sbin EXAMPLEDIR := $(DESTDIR)/usr/share/doc/pbuilder/examples +EXAMPLE_LVMPBUILDERDIR := $(EXAMPLEDIR)/lvmpbuilder +EXAMPLE_LVMPBUILDER_LIBDIR := $(EXAMPLE_LVMPBUILDERDIR)/lib +EXAMPLE_PBUILDERTESTDIR := $(EXAMPLEDIR)/pbuilder-test +EXAMPLE_REBUILDDIR := $(EXAMPLEDIR)/rebuild +EXAMPLE_WORKAROUNDDIR := $(EXAMPLEDIR)/workaround PKGDATADIR := $(DESTDIR)/usr/share/pbuilder define newline @@ -51,6 +56,10 @@ SBIN_SCRIPTS += \ pbuilder \ $(NULL) +EXAMPLE_DATA += \ + pbuilderrc \ + $(NULL) + EXAMPLE_SCRIPTS += \ examples/B90lintian \ examples/B91dpkg-i \ @@ -69,6 +78,54 @@ EXAMPLE_SCRIPTS += \ examples/pbuilder-distribution.sh \ $(NULL) +EXAMPLE_LVMPBUILDER_DATA += \ + examples/lvmpbuilder/README \ + examples/lvmpbuilder/STRATEGY \ + $(NULL) + +EXAMPLE_LVMPBUILDER_SCRIPTS += \ + examples/lvmpbuilder/lvmbuilder \ + $(NULL) + +EXAMPLE_LVMPBUILDER_LIB_DATA += \ + examples/lvmpbuilder/lib/lvmbuilder-checkparams \ + examples/lvmpbuilder/lib/lvmbuilder-modules \ + examples/lvmpbuilder/lib/lvmbuilder-unimplemented \ + $(NULL) + +EXAMPLE_LVMPBUILDER_LIB_SCRIPTS += \ + $(NULL) + +EXAMPLE_PBUILDERTEST_DATA += \ + examples/pbuilder-test/README \ + examples/pbuilder-test/002_sample.c \ + $(NULL) + +EXAMPLE_PBUILDERTEST_SCRIPTS += \ + examples/pbuilder-test/000_prepinstall \ + examples/pbuilder-test/001_apprun \ + examples/pbuilder-test/002_libfile \ + examples/pbuilder-test/003_makecheck \ + examples/pbuilder-test/004_ldd \ + $(NULL) + +EXAMPLE_REBUILD_DATA += \ + examples/rebuild/README \ + $(NULL) + +EXAMPLE_REBUILD_SCRIPTS += \ + examples/rebuild/buildall \ + examples/rebuild/getlist \ + $(NULL) + +EXAMPLE_WORKAROUND_DATA += \ + $(NULL) + +EXAMPLE_WORKAROUND_SCRIPTS += \ + examples/E50-initscripts-2.86.ds1-7.workaround.sh \ + examples/G50-initscripts-2.86.ds1-11-cdebootstrap0.3.9.sh \ + $(NULL) + NOINST_SCRIPTS += \ debuild.sh \ testlib.sh \ @@ -118,46 +175,34 @@ install: $(INSTALL_DIRECTORY) $(PKGLIBDIR) $(INSTALL_DIRECTORY) $(PKGDATADIR) $(INSTALL_DIRECTORY) $(EXAMPLEDIR) - $(INSTALL_DIRECTORY) $(EXAMPLEDIR)/rebuild - $(INSTALL_DIRECTORY) $(EXAMPLEDIR)/pbuilder-test - $(INSTALL_DIRECTORY) $(EXAMPLEDIR)/lvmpbuilder - $(INSTALL_DIRECTORY) $(EXAMPLEDIR)/lvmpbuilder/lib + $(INSTALL_DIRECTORY) $(EXAMPLE_LVMPBUILDERDIR) + $(INSTALL_DIRECTORY) $(EXAMPLE_LVMPBUILDER_LIBDIR) + $(INSTALL_DIRECTORY) $(EXAMPLE_PBUILDERTESTDIR) + $(INSTALL_DIRECTORY) $(EXAMPLE_REBUILDDIR) + $(INSTALL_DIRECTORY) $(EXAMPLE_WORKAROUNDDIR) $(INSTALL_DIRECTORY) $(DESTDIR)/var/cache/pbuilder/pbuilder-mnt $(INSTALL_DIRECTORY) $(DESTDIR)/var/cache/pbuilder/pbuilder-umlresult $(foreach script,$(BIN_SCRIPTS),$(INSTALL_EXECUTABLE) $(script) $(BINDIR)$(newline)) $(foreach script,$(PKGLIB_SCRIPTS),$(INSTALL_EXECUTABLE) $(script) $(PKGLIBDIR)$(newline)) $(foreach script,$(SBIN_SCRIPTS),$(INSTALL_EXECUTABLE) $(script) $(SBINDIR)$(newline)) + $(foreach file,$(EXAMPLE_DATA),$(INSTALL_FILE) $(file) $(EXAMPLEDIR)$(newline)) $(foreach script,$(EXAMPLE_SCRIPTS),$(INSTALL_EXECUTABLE) $(script) $(EXAMPLEDIR)$(newline)) + $(foreach file,$(EXAMPLE_REBUILD_DATA),$(INSTALL_FILE) $(file) $(EXAMPLE_REBUILDDIR)$(newline)) + $(foreach script,$(EXAMPLE_REBUILD_SCRIPTS),$(INSTALL_EXECUTABLE) $(script) $(EXAMPLE_REBUILDDIR)$(newline)) + $(foreach file,$(EXAMPLE_PBUILDERTEST_DATA),$(INSTALL_FILE) $(file) $(EXAMPLE_PBUILDERTESTDIR)$(newline)) + $(foreach script,$(EXAMPLE_PBUILDERTEST_SCRIPTS),$(INSTALL_EXECUTABLE) $(script) $(EXAMPLE_PBUILDERTESTDIR)$(newline)) + $(foreach file,$(EXAMPLE_LVMPBUILDER_DATA),$(INSTALL_FILE) $(file) $(EXAMPLE_LVMPBUILDERDIR)$(newline)) + $(foreach script,$(EXAMPLE_LVMPBUILDER_SCRIPTS),$(INSTALL_EXECUTABLE) $(script) $(EXAMPLE_LVMPBUILDERDIR)$(newline)) + $(foreach file,$(EXAMPLE_LVMPBUILDER_LIB_DATA),$(INSTALL_FILE) $(file) $(EXAMPLE_LVMPBUILDER_LIBDIR)$(newline)) + $(foreach script,$(EXAMPLE_LVMPBUILDER_LIB_SCRIPTS),$(INSTALL_EXECUTABLE) $(script) $(EXAMPLE_LVMPBUILDER_LIBDIR)$(newline)) + $(foreach file,$(EXAMPLE_WORKAROUND_DATA),$(INSTALL_FILE) $(file) $(EXAMPLE_WORKAROUNDDIR)$(newline)) + $(foreach script,$(EXAMPLE_WORKAROUND_SCRIPTS),$(INSTALL_EXECUTABLE) $(script) $(EXAMPLE_WORKAROUNDDIR)$(newline)) # install -aptitude flavour as the default satisfydepends ln -sf pbuilder-satisfydepends-aptitude $(PKGLIBDIR)/pbuilder-satisfydepends - $(INSTALL_FILE) pbuilderrc $(EXAMPLEDIR) $(INSTALL_FILE) bash_completion.pbuilder $(DESTDIR)/etc/bash_completion.d/pbuilder $(INSTALL_FILE) pbuilderrc $(PKGDATADIR) $(INSTALL_FILE) pbuilder-uml.conf $(SYSCONFDIR)/pbuilder $(INSTALL_FILE) pbuilder-uml.conf $(PKGDATADIR) - $(INSTALL_EXECUTABLE) examples/rebuild/buildall $(EXAMPLEDIR)/rebuild - $(INSTALL_EXECUTABLE) examples/rebuild/getlist $(EXAMPLEDIR)/rebuild - $(INSTALL_FILE) examples/rebuild/README $(EXAMPLEDIR)/rebuild - $(INSTALL_FILE) examples/pbuilder-test/README $(EXAMPLEDIR)/pbuilder-test - $(INSTALL_EXECUTABLE) examples/pbuilder-test/000_prepinstall $(EXAMPLEDIR)/pbuilder-test - $(INSTALL_EXECUTABLE) examples/pbuilder-test/001_apprun $(EXAMPLEDIR)/pbuilder-test - $(INSTALL_EXECUTABLE) examples/pbuilder-test/002_libfile $(EXAMPLEDIR)/pbuilder-test - $(INSTALL_FILE) examples/pbuilder-test/002_sample.c $(EXAMPLEDIR)/pbuilder-test - $(INSTALL_EXECUTABLE) examples/pbuilder-test/003_makecheck $(EXAMPLEDIR)/pbuilder-test - $(INSTALL_EXECUTABLE) examples/pbuilder-test/004_ldd $(EXAMPLEDIR)/pbuilder-test - - $(INSTALL_FILE) examples/lvmpbuilder/README $(EXAMPLEDIR)/lvmpbuilder - $(INSTALL_FILE) examples/lvmpbuilder/STRATEGY $(EXAMPLEDIR)/lvmpbuilder - $(INSTALL_EXECUTABLE) examples/lvmpbuilder/lvmbuilder $(EXAMPLEDIR)/lvmpbuilder - $(INSTALL_FILE) examples/lvmpbuilder/lib/lvmbuilder-checkparams $(EXAMPLEDIR)/lvmpbuilder/lib - $(INSTALL_FILE) examples/lvmpbuilder/lib/lvmbuilder-modules $(EXAMPLEDIR)/lvmpbuilder/lib - $(INSTALL_FILE) examples/lvmpbuilder/lib/lvmbuilder-unimplemented $(EXAMPLEDIR)/lvmpbuilder/lib - - # install workaround for initscripts -- 2005-12-21 - $(INSTALL_DIRECTORY) $(EXAMPLEDIR)/workaround - $(INSTALL_EXECUTABLE) examples/E50-initscripts-2.86.ds1-7.workaround.sh $(EXAMPLEDIR)/workaround - $(INSTALL_EXECUTABLE) examples/G50-initscripts-2.86.ds1-11-cdebootstrap0.3.9.sh $(EXAMPLEDIR)/workaround - $(MAKE) -C pbuildd $@ $(MAKE) -C Documentation $@ -- cgit v1.2.3