diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-03-27 19:44:34 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-03-27 21:27:19 -0400 |
commit | 086df91f23d1f3486725353ffe1630da8f9c8f5c (patch) | |
tree | c583bb8b5ffcfd915b02a44ef9799bd47f2bbbc5 /build-aux | |
parent | 36f875645e36bf1ff015cc7d3441de2e1714b6fc (diff) |
Makefile: Use files.groups instead of nested.subdirs to split the package
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/Makefile.each.head/20-libretools.mk | 2 | ||||
-rw-r--r-- | build-aux/Makefile.each.tail/20-libretools.mk | 36 | ||||
-rw-r--r-- | build-aux/Makefile.once.head/00-libretools.mk | 7 |
3 files changed, 29 insertions, 16 deletions
diff --git a/build-aux/Makefile.each.head/20-libretools.mk b/build-aux/Makefile.each.head/20-libretools.mk index 470db51..22f59ba 100644 --- a/build-aux/Makefile.each.head/20-libretools.mk +++ b/build-aux/Makefile.each.head/20-libretools.mk @@ -19,6 +19,8 @@ pkglibdir = $(libdir)/libretools # Auto-detect ######################################################## +libretools.pkg = libretools + libretools.src.devtools = libretools.out.mans = $(patsubst %.ronn,%,$(libretools.src.ronn)) diff --git a/build-aux/Makefile.each.tail/20-libretools.mk b/build-aux/Makefile.each.tail/20-libretools.mk index 945b0ea..9b1a6e3 100644 --- a/build-aux/Makefile.each.tail/20-libretools.mk +++ b/build-aux/Makefile.each.tail/20-libretools.mk @@ -21,23 +21,28 @@ endif # Connect with `files` module ######################################## files.src.gen += $(libretools.src.devtools) -files.out.all += $(filter-out $(files.src),$(libretools.out)) \ - $(if $(strip $(libretools.pots)),dir.pot) -files.sys.all += $(addprefix $(bindir)/,$(libretools.out.bins)) \ - $(addprefix $(pkgconfdir)/,$(libretools.out.confs)) \ - $(addprefix $(pkglibdir)/,$(libretools.out.libs)) \ - $(addprefix $(pkglibexecdir)/,$(libretools.out.libexecs)) \ - $(addprefix $(docdir)/,$(libretools.out.docs)) \ - $(addprefix $(mandir)/man1/,$(filter %.1,$(libretools.out.mans))) \ - $(addprefix $(mandir)/man2/,$(filter %.2,$(libretools.out.mans))) \ - $(addprefix $(mandir)/man3/,$(filter %.3,$(libretools.out.mans))) \ - $(addprefix $(mandir)/man4/,$(filter %.4,$(libretools.out.mans))) \ - $(addprefix $(mandir)/man5/,$(filter %.5,$(libretools.out.mans))) \ - $(addprefix $(mandir)/man6/,$(filter %.6,$(libretools.out.mans))) \ - $(addprefix $(mandir)/man7/,$(filter %.7,$(libretools.out.mans))) \ - $(addprefix $(mandir)/man8/,$(filter %.8,$(libretools.out.mans))) +files.out.$(libretools.pkg) += \ + $(filter-out $(files.src),$(libretools.out)) \ + $(if $(strip $(libretools.pots)),dir.pot) +files.sys.$(libretools.pkg) += \ + $(addprefix $(bindir)/,$(libretools.out.bins)) \ + $(addprefix $(pkgconfdir)/,$(libretools.out.confs)) \ + $(addprefix $(pkglibdir)/,$(libretools.out.libs)) \ + $(addprefix $(pkglibexecdir)/,$(libretools.out.libexecs)) \ + $(addprefix $(docdir)/,$(libretools.out.docs)) \ + $(addprefix $(mandir)/man1/,$(filter %.1,$(libretools.out.mans))) \ + $(addprefix $(mandir)/man2/,$(filter %.2,$(libretools.out.mans))) \ + $(addprefix $(mandir)/man3/,$(filter %.3,$(libretools.out.mans))) \ + $(addprefix $(mandir)/man4/,$(filter %.4,$(libretools.out.mans))) \ + $(addprefix $(mandir)/man5/,$(filter %.5,$(libretools.out.mans))) \ + $(addprefix $(mandir)/man6/,$(filter %.6,$(libretools.out.mans))) \ + $(addprefix $(mandir)/man7/,$(filter %.7,$(libretools.out.mans))) \ + $(addprefix $(mandir)/man8/,$(filter %.8,$(libretools.out.mans))) files.out.int += *.pot *.ugly *.rej *.orig +files.out.all += $(foreach pkg,$(filter-out all,$(files.groups)),$(files.out.$(pkg))) +files.sys.all += $(foreach pkg,$(filter-out all,$(files.groups)),$(files.sys.$(pkg))) + # Generate rules ##################################################### $(srcdir)/%.in: $(devtoolsdir)/%.in cp -T '$<' '$@' @@ -57,6 +62,7 @@ $(srcdir)/%.pot: $(srcdir)/% $(topsrcdir)/src/lib/librexgettext cd $(<D) && $(abspath $(topsrcdir)/src/lib/librexgettext) $(LIBREXGETTEXT_FLAGS) $(<F) > $(@F) $(srcdir)/dir.pot: $(addprefix $(outdir)/,$(addsuffix .pot,$(libretools.pots))) cat $^ | $(libretools.pofmt) > '$@' +$(call at.path,$(topsrcdir)/po/$(libretools.pkg).pot): $(srcdir)/dir.pot # Install rules ###################################################### $(DESTDIR)$(pkgconfdir)/% : $(outdir)/% ; install -T -Dm644 '$<' '$@' diff --git a/build-aux/Makefile.once.head/00-libretools.mk b/build-aux/Makefile.once.head/00-libretools.mk index f3462d5..eb73476 100644 --- a/build-aux/Makefile.once.head/00-libretools.mk +++ b/build-aux/Makefile.once.head/00-libretools.mk @@ -1,4 +1,4 @@ -# Copyright (C) 2015, 2017 Luke Shumaker +# Copyright (C) 2015, 2017-2018 Luke Shumaker # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -38,6 +38,7 @@ define mod.libretools.doc # - `libretools.edit` # - `libretools.pofmt` # - Source information +# - Directory variable : `libretools.pkg = libretools` # - Directory variable : `libretools.src` # - Directory variable : `libretools.src.exec` # - Directory variable : `libretools.src.conf` @@ -51,8 +52,11 @@ define mod.libretools.doc # - Global variable : `DEVTOOLS_VERSION` # - Global variable : `DEVTOOLS_COMMIT` # - Primary outputs: +# - Global variable : `files.groups` # - Directory variable : `files.src.gen` +# - Directory variable : `files.out.$(libretools.pkg)` # - Directory variable : `files.out.all` +# - Directory variable : `files.sys.$(libretools.pkg)` # - Directory variable : `files.sys.all` # - Directory variable : `files.out.int` # - Target : `$(srcdir)/%.in: $(devtoolsdir)/%.in` @@ -76,6 +80,7 @@ mod.quote.doc := $(value mod.quote.doc) # Configure how Autothing modules work ############################### gitfiles.file = .srcfiles.mk +files.groups = all libretools librelib gitget xbs # Boilerplate ######################################################## .PHONY: FORCE |