From 5bf4240c0968919013e3623ba774da1a8eac5e09 Mon Sep 17 00:00:00 2001 From: Roger Leigh Date: Sat, 23 Mar 2013 22:46:45 +0000 Subject: build: Use non-recursive make Don't recurse into subdirectories (with the exception of po). Include Makefile.am fragments from subdirectories into the top-level Makefile, adjusted to use paths relative to the root. --- bin/Makefile.am | 33 --------------------- bin/csbuild/Makefile.am | 30 ++++++++----------- bin/dchroot-dsa/Makefile.am | 30 ++++++++----------- bin/dchroot/Makefile.am | 50 ++++++++++++++------------------ bin/schroot-base/Makefile.am | 28 +++++++----------- bin/schroot-listmounts/Makefile.am | 23 ++++++--------- bin/schroot-mount/Makefile.am | 22 +++++--------- bin/schroot-releaselock/Makefile.am | 22 +++++--------- bin/schroot-sbuild/Makefile.am | 26 +++++++---------- bin/schroot/Makefile.am | 58 +++++++++++++++++-------------------- 10 files changed, 117 insertions(+), 205 deletions(-) delete mode 100644 bin/Makefile.am (limited to 'bin') diff --git a/bin/Makefile.am b/bin/Makefile.am deleted file mode 100644 index 45bf3b59..00000000 --- a/bin/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -# schroot Makefile template -# -# -# Copyright © 2004-2007 Roger Leigh -# -# schroot is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# schroot is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# . -# -##################################################################### - -include $(top_srcdir)/scripts/global.mk - -SUBDIRS = \ - schroot-base \ - schroot \ - schroot-listmounts \ - schroot-mount \ - schroot-releaselock \ - schroot-sbuild \ - dchroot \ - dchroot-dsa \ - csbuild diff --git a/bin/csbuild/Makefile.am b/bin/csbuild/Makefile.am index cc0517bb..85628341 100644 --- a/bin/csbuild/Makefile.am +++ b/bin/csbuild/Makefile.am @@ -19,29 +19,23 @@ # ##################################################################### -include $(top_srcdir)/scripts/global.mk - -LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) -I$(top_srcdir)/bin - -LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\" -DCSBUILD_CONF=\"$(CSBUILD_CONF)\" - if BUILD_CSBUILD -csbuild = csbuild +csbuild = bin/csbuild/csbuild endif -bin_PROGRAMS = $(csbuild) +bin_PROGRAMS += $(csbuild) -csbuild_SOURCES = \ - csbuild-debian-changes.h \ - csbuild-debian-changes.cc \ - csbuild-options.h \ - csbuild-options.cc \ - csbuild-main.h \ - csbuild-main.cc \ - csbuild.cc -csbuild_LDADD = $(top_builddir)/bin/schroot/libschroot.la +bin_csbuild_csbuild_SOURCES = \ + bin/csbuild/csbuild-debian-changes.h \ + bin/csbuild/csbuild-debian-changes.cc \ + bin/csbuild/csbuild-options.h \ + bin/csbuild/csbuild-options.cc \ + bin/csbuild/csbuild-main.h \ + bin/csbuild/csbuild-main.cc \ + bin/csbuild/csbuild.cc +bin_csbuild_csbuild_LDADD = $(top_builddir)/bin/schroot/libschroot.la -install-exec-hook: +install-exec-hook:: # Install setuid root. if [ -f "$(DESTDIR)$(bindir)/csbuild" ]; then \ chmod 4755 "$(DESTDIR)$(bindir)/csbuild"; \ diff --git a/bin/dchroot-dsa/Makefile.am b/bin/dchroot-dsa/Makefile.am index e64bbdce..02a31a97 100644 --- a/bin/dchroot-dsa/Makefile.am +++ b/bin/dchroot-dsa/Makefile.am @@ -19,29 +19,23 @@ # ##################################################################### -include $(top_srcdir)/scripts/global.mk - -LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) -I$(top_srcdir)/bin - -LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\" -DDCHROOT_CONF=\"$(DCHROOT_CONF)\" - if BUILD_DCHROOT_DSA -dchroot_dsa = dchroot-dsa +dchroot_dsa = bin/dchroot-dsa/dchroot-dsa endif -bin_PROGRAMS = $(dchroot_dsa) +bin_PROGRAMS += $(dchroot_dsa) -dchroot_dsa_SOURCES = \ - dchroot-dsa-session.h \ - dchroot-dsa-session.cc \ - dchroot-dsa-options.h \ - dchroot-dsa-options.cc \ - dchroot-dsa-main.h \ - dchroot-dsa-main.cc \ - dchroot-dsa.cc -dchroot_dsa_LDADD = $(top_builddir)/bin/dchroot/libdchroot.la +bin_dchroot_dsa_dchroot_dsa_SOURCES = \ + bin/dchroot-dsa/dchroot-dsa-session.h \ + bin/dchroot-dsa/dchroot-dsa-session.cc \ + bin/dchroot-dsa/dchroot-dsa-options.h \ + bin/dchroot-dsa/dchroot-dsa-options.cc \ + bin/dchroot-dsa/dchroot-dsa-main.h \ + bin/dchroot-dsa/dchroot-dsa-main.cc \ + bin/dchroot-dsa/dchroot-dsa.cc +bin_dchroot_dsa_dchroot_dsa_LDADD = $(top_builddir)/bin/dchroot/libdchroot.la -install-exec-hook: +install-exec-hook:: # Install setuid root. if [ -f "$(DESTDIR)$(bindir)/dchroot-dsa" ]; then \ chmod 4755 "$(DESTDIR)$(bindir)/dchroot-dsa"; \ diff --git a/bin/dchroot/Makefile.am b/bin/dchroot/Makefile.am index 3a0d4aed..22f41e4d 100644 --- a/bin/dchroot/Makefile.am +++ b/bin/dchroot/Makefile.am @@ -19,40 +19,34 @@ # ##################################################################### -include $(top_srcdir)/scripts/global.mk - -LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) -I$(top_srcdir)/bin - -LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\" -DDCHROOT_CONF=\"$(DCHROOT_CONF)\" - if BUILD_LIBDCHROOT -noinst_LTLIBRARIES = libdchroot.la +noinst_LTLIBRARIES += bin/dchroot/libdchroot.la endif if BUILD_DCHROOT -dchroot = dchroot +dchroot = bin/dchroot/dchroot endif -bin_PROGRAMS = $(dchroot) - -libdchroot_la_SOURCES = \ - dchroot-main-base.h \ - dchroot-main-base.cc \ - dchroot-session-base.h \ - dchroot-session-base.cc -libdchroot_la_LIBADD = $(top_builddir)/bin/schroot/libschroot.la - -dchroot_SOURCES = \ - dchroot-session.h \ - dchroot-session.cc \ - dchroot-options.h \ - dchroot-options.cc \ - dchroot-main.h \ - dchroot-main.cc \ - dchroot.cc -dchroot_LDADD = libdchroot.la - -install-exec-hook: +bin_PROGRAMS += $(dchroot) + +bin_dchroot_libdchroot_la_SOURCES = \ + bin/dchroot/dchroot-main-base.h \ + bin/dchroot/dchroot-main-base.cc \ + bin/dchroot/dchroot-session-base.h \ + bin/dchroot/dchroot-session-base.cc +bin_dchroot_libdchroot_la_LIBADD = $(top_builddir)/bin/schroot/libschroot.la + +bin_dchroot_dchroot_SOURCES = \ + bin/dchroot/dchroot-session.h \ + bin/dchroot/dchroot-session.cc \ + bin/dchroot/dchroot-options.h \ + bin/dchroot/dchroot-options.cc \ + bin/dchroot/dchroot-main.h \ + bin/dchroot/dchroot-main.cc \ + bin/dchroot/dchroot.cc +bin_dchroot_dchroot_LDADD = $(top_builddir)/bin/dchroot/libdchroot.la + +install-exec-hook:: # Install setuid root. if [ -f "$(DESTDIR)$(bindir)/dchroot" ]; then \ chmod 4755 "$(DESTDIR)$(bindir)/dchroot"; \ diff --git a/bin/schroot-base/Makefile.am b/bin/schroot-base/Makefile.am index f4037206..39d098ed 100644 --- a/bin/schroot-base/Makefile.am +++ b/bin/schroot-base/Makefile.am @@ -19,22 +19,14 @@ # ##################################################################### -include $(top_srcdir)/scripts/global.mk +noinst_LTLIBRARIES += bin/schroot-base/libschroot-base.la -localedir = $(datadir)/locale - -LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) -I$(top_srcdir)/bin - -LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\" - -noinst_LTLIBRARIES = libschroot-base.la - -libschroot_base_la_SOURCES = \ - schroot-base-main.h \ - schroot-base-main.cc \ - schroot-base-option-action.h \ - schroot-base-option-action.cc \ - schroot-base-options.h \ - schroot-base-options.cc \ - schroot-base-run.h -libschroot_base_la_LIBADD = $(top_builddir)/sbuild/libsbuild.la +bin_schroot_base_libschroot_base_la_SOURCES = \ + bin/schroot-base/schroot-base-main.h \ + bin/schroot-base/schroot-base-main.cc \ + bin/schroot-base/schroot-base-option-action.h \ + bin/schroot-base/schroot-base-option-action.cc \ + bin/schroot-base/schroot-base-options.h \ + bin/schroot-base/schroot-base-options.cc \ + bin/schroot-base/schroot-base-run.h +bin_schroot_base_libschroot_base_la_LIBADD = $(top_builddir)/sbuild/libsbuild.la diff --git a/bin/schroot-listmounts/Makefile.am b/bin/schroot-listmounts/Makefile.am index 63a461f8..28ee7e60 100644 --- a/bin/schroot-listmounts/Makefile.am +++ b/bin/schroot-listmounts/Makefile.am @@ -19,18 +19,13 @@ # ##################################################################### -include $(top_srcdir)/scripts/global.mk +pkglibexec_PROGRAMS += bin/schroot-listmounts/schroot-listmounts -LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) -I$(top_srcdir)/bin - -LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\" - -pkglibexec_PROGRAMS = schroot-listmounts - -schroot_listmounts_SOURCES = \ - schroot-listmounts-main.h \ - schroot-listmounts-main.cc \ - schroot-listmounts-options.h \ - schroot-listmounts-options.cc \ - schroot-listmounts.cc -schroot_listmounts_LDADD = $(top_builddir)/bin/schroot-base/libschroot-base.la +bin_schroot_listmounts_schroot_listmounts_SOURCES = \ + bin/schroot-listmounts/schroot-listmounts-main.h \ + bin/schroot-listmounts/schroot-listmounts-main.cc \ + bin/schroot-listmounts/schroot-listmounts-options.h \ + bin/schroot-listmounts/schroot-listmounts-options.cc \ + bin/schroot-listmounts/schroot-listmounts.cc +bin_schroot_listmounts_schroot_listmounts_LDADD = \ + $(top_builddir)/bin/schroot-base/libschroot-base.la diff --git a/bin/schroot-mount/Makefile.am b/bin/schroot-mount/Makefile.am index 8d7fab18..b4860987 100644 --- a/bin/schroot-mount/Makefile.am +++ b/bin/schroot-mount/Makefile.am @@ -19,21 +19,15 @@ # ##################################################################### -include $(top_srcdir)/scripts/global.mk +pkglibexec_PROGRAMS += bin/schroot-mount/schroot-mount -LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) -I$(top_srcdir)/bin +bin_schroot_mount_schroot_mount_SOURCES = \ + bin/schroot-mount/schroot-mount-main.h \ + bin/schroot-mount/schroot-mount-main.cc \ + bin/schroot-mount/schroot-mount-options.h \ + bin/schroot-mount/schroot-mount-options.cc \ + bin/schroot-mount/schroot-mount.cc -LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\" - -pkglibexec_PROGRAMS = schroot-mount - -schroot_mount_SOURCES = \ - schroot-mount-main.h \ - schroot-mount-main.cc \ - schroot-mount-options.h \ - schroot-mount-options.cc \ - schroot-mount.cc - -schroot_mount_LDADD = $(BOOST_FILESYSTEM_LIBS) \ +bin_schroot_mount_schroot_mount_LDADD = $(BOOST_FILESYSTEM_LIBS) \ $(top_builddir)/bin/schroot-base/libschroot-base.la diff --git a/bin/schroot-releaselock/Makefile.am b/bin/schroot-releaselock/Makefile.am index 5360dc2c..21e648d3 100644 --- a/bin/schroot-releaselock/Makefile.am +++ b/bin/schroot-releaselock/Makefile.am @@ -19,20 +19,14 @@ # ##################################################################### -include $(top_srcdir)/scripts/global.mk - -LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) -I$(top_srcdir)/bin - -LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\" - if BUILD_BLOCKDEV -pkglibexec_PROGRAMS = schroot-releaselock +pkglibexec_PROGRAMS += bin/schroot-releaselock/schroot-releaselock endif -schroot_releaselock_SOURCES = \ - schroot-releaselock-main.h \ - schroot-releaselock-main.cc \ - schroot-releaselock-options.h \ - schroot-releaselock-options.cc \ - schroot-releaselock.cc -schroot_releaselock_LDADD = $(top_builddir)/bin/schroot-base/libschroot-base.la +bin_schroot_releaselock_schroot_releaselock_SOURCES = \ + bin/schroot-releaselock/schroot-releaselock-main.h \ + bin/schroot-releaselock/schroot-releaselock-main.cc \ + bin/schroot-releaselock/schroot-releaselock-options.h \ + bin/schroot-releaselock/schroot-releaselock-options.cc \ + bin/schroot-releaselock/schroot-releaselock.cc +bin_schroot_releaselock_schroot_releaselock_LDADD = $(top_builddir)/bin/schroot-base/libschroot-base.la diff --git a/bin/schroot-sbuild/Makefile.am b/bin/schroot-sbuild/Makefile.am index d4661241..eb41cddb 100644 --- a/bin/schroot-sbuild/Makefile.am +++ b/bin/schroot-sbuild/Makefile.am @@ -19,25 +19,19 @@ # ##################################################################### -include $(top_srcdir)/scripts/global.mk +schroot_sbuild = bin/schroot-sbuild/schroot-sbuild -LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) -I$(top_srcdir)/bin +bin_PROGRAMS += $(schroot_sbuild) -LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\" +bin_schroot_sbuild_schroot_sbuild_SOURCES = \ + bin/schroot-sbuild/schroot-sbuild-session.h \ + bin/schroot-sbuild/schroot-sbuild-session.cc \ + bin/schroot-sbuild/schroot-sbuild-main.h \ + bin/schroot-sbuild/schroot-sbuild-main.cc \ + bin/schroot-sbuild/schroot-sbuild.cc +bin_schroot_sbuild_schroot_sbuild_LDADD = $(top_builddir)/bin/schroot/libschroot-all.la -schroot_sbuild = schroot-sbuild - -bin_PROGRAMS = $(schroot_sbuild) - -schroot_sbuild_SOURCES = \ - schroot-sbuild-session.h \ - schroot-sbuild-session.cc \ - schroot-sbuild-main.h \ - schroot-sbuild-main.cc \ - schroot-sbuild.cc -schroot_sbuild_LDADD = $(top_builddir)/bin/schroot/libschroot-all.la - -install-exec-hook: +install-exec-hook:: # Install setuid root. if [ -f "$(DESTDIR)$(bindir)/schroot-sbuild" ]; then \ chmod 4755 "$(DESTDIR)$(bindir)/schroot-sbuild"; \ diff --git a/bin/schroot/Makefile.am b/bin/schroot/Makefile.am index 463e20ec..7ce59220 100644 --- a/bin/schroot/Makefile.am +++ b/bin/schroot/Makefile.am @@ -19,41 +19,35 @@ # ##################################################################### -include $(top_srcdir)/scripts/global.mk - -localedir = $(datadir)/locale - -LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) -I$(top_srcdir)/bin - -LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\" - -noinst_LTLIBRARIES = libschroot.la libschroot-all.la - -bin_PROGRAMS = schroot - -libschroot_la_SOURCES = \ - schroot-options-base.h \ - schroot-options-base.cc \ - schroot-main-base.h \ - schroot-main-base.cc \ - schroot-main.h \ - schroot-main.cc -libschroot_la_LIBADD = $(top_builddir)/bin/schroot-base/libschroot-base.la - -libschroot_all_la_SOURCES = \ - schroot-options.h \ - schroot-options.cc -libschroot_all_la_LIBADD = libschroot.la - -schroot_SOURCES = \ - schroot.cc -schroot_LDADD = libschroot-all.la - -install-exec-hook: +noinst_LTLIBRARIES += \ + bin/schroot/libschroot.la \ + bin/schroot/libschroot-all.la + +bin_PROGRAMS += bin/schroot/schroot + +bin_schroot_libschroot_la_SOURCES = \ + bin/schroot/schroot-options-base.h \ + bin/schroot/schroot-options-base.cc \ + bin/schroot/schroot-main-base.h \ + bin/schroot/schroot-main-base.cc \ + bin/schroot/schroot-main.h \ + bin/schroot/schroot-main.cc +bin_schroot_libschroot_la_LIBADD = $(top_builddir)/bin/schroot-base/libschroot-base.la + +bin_schroot_libschroot_all_la_SOURCES = \ + bin/schroot/schroot-options.h \ + bin/schroot/schroot-options.cc +bin_schroot_libschroot_all_la_LIBADD = bin/schroot/libschroot.la + +bin_schroot_schroot_SOURCES = \ + bin/schroot/schroot.cc +bin_schroot_schroot_LDADD = bin/schroot/libschroot-all.la + +install-exec-hook:: # Install setuid root. chmod 4755 "$(DESTDIR)$(bindir)/schroot" -install-data-hook: +install-data-hook:: $(MKDIR_P) $(DESTDIR)$(schroot_sysconf_chrootdir) $(MKDIR_P) $(DESTDIR)$(schroot_mountdir) $(MKDIR_P) $(DESTDIR)$(schroot_sessiondir) -- cgit v1.2.3