diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | common.each.head.mk | 5 | ||||
-rw-r--r-- | common.each.tail.mk | 1 | ||||
-rw-r--r-- | common.once.head.mk | 2 | ||||
-rw-r--r-- | src/Makefile | 2 |
5 files changed, 8 insertions, 4 deletions
@@ -34,6 +34,6 @@ pots = am_out_files += $(foreach package,$(packages),po/$(package).pot) am_clean_files += .var.* am_gen_files += .srcversion-libretools.mk .srcversion-devtools.mk -am_subdirs = src +am_subdirs = src $(foreach package,$(packages),$($(package))) include $(topsrcdir)/automake.tail.mk diff --git a/common.each.head.mk b/common.each.head.mk index 8a2a68d..937c13a 100644 --- a/common.each.head.mk +++ b/common.each.head.mk @@ -4,11 +4,13 @@ pkglibexecdir = $(libexecdir)/libretools # Detect things about the directory we're in #################################### +srcfiles-ignore/$(srcdir) = $(addsuffix /%,$(_am_subdirs/$(@D))) + ifeq ($(wildcard $(topsrcdir)/.git),) include $(srcdir)/.srcfiles.mk else $(srcdir)/.srcfiles.mk: FORCE - @echo am_src_files = $(filter-out $(addsuffix /%,$(_am_subdirs/$(@D))),$(shell cd $(@D) && git ls-files)) | $(write-ifchanged) $@ + @echo srcfiles = $(filter-out $(srcfiles-ignore/$(@D)),$(shell cd $(@D) && git ls-files)) | $(write-ifchanged) $@ -include $(srcdir)/.srcfiles.mk endif @@ -21,6 +23,7 @@ detect-ignore-sh = devtools-files = +install-srcs = $(detect-all) install-mans = $(patsubst %.ronn,%,$(detect-ronn)) install-bins = $(detect-exec) install-libexecs = diff --git a/common.each.tail.mk b/common.each.tail.mk index 3192ddb..c149555 100644 --- a/common.each.tail.mk +++ b/common.each.tail.mk @@ -13,6 +13,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +am_src_files += $(install-srcs) am_gen_files += .srcfiles.mk $(devtools-files) am_out_files += $(filter-out $(am_src_files) $(am_gen_files),$(install-files)) \ $(if $(pots),everything.pot) diff --git a/common.once.head.mk b/common.once.head.mk index f27fe07..d7faab8 100644 --- a/common.once.head.mk +++ b/common.once.head.mk @@ -51,7 +51,7 @@ pofmt = msguniq -Fi --to-code=UTF-8 # It's easy to think of these as "each" variables, but because they # will be evaluated on demand, only am_src_files needs to be "each". -detect-all = $(filter-out $(detect-ignore) ,$(am_src_files)) +detect-all = $(filter-out $(detect-ignore) ,$(srcfiles)) detect-exec = $(filter-out $(detect-ignore-exec),$(patsubst $(srcdir)/%,%,$(shell find $(addprefix $(srcdir)/,$(detect-all)) -executable))) detect-conf = $(filter-out $(detect-ignore-conf),$(filter %.conf ,$(detect-all))) detect-ronn = $(filter-out $(detect-ignore-ronn),$(filter %.ronn ,$(detect-all))) diff --git a/src/Makefile b/src/Makefile index 8fbe735..e1e5cf4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2,6 +2,6 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../config.mk include $(topsrcdir)/automake.head.mk pkgconfdir = $(sysconfdir) -am_subdirs = abslibre-tools chroot-tools devtools gitget lib librefetch toru xbs xbs-abs xbs-abslibre +srcfiles-ignore/$(srcdir) = $(addsuffix /%,abslibre-tools chroot-tools devtools gitget lib librefetch toru xbs xbs-abs xbs-abslibre) include $(topsrcdir)/automake.tail.mk |