From aa4a03eae20d3de63c6e2659ebdfe1be5db434ee Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 8 Jul 2017 21:31:13 -0400 Subject: Makefile: have docdir behave the way the GNU standards say. I had docdir = $(datarootdir)/doc pkgdocdir = $(docdir)/libretools # install docs to $(pkgdocdir) but the GNU Coding Standards (July 25, 2016 revision), say I should be doing docdir = $(datarootdir)/doc/libretools # install docs to $(docdir) As the config.mk states, we aren't a GNU package. But let's still follow their standards here, to follow the principle of least surprise. --- build-aux/Makefile.each.head/20-libretools.mk | 1 - build-aux/Makefile.each.tail/20-libretools.mk | 4 ++-- build-aux/Makefile.once.head/00-libretools.mk | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'build-aux') diff --git a/build-aux/Makefile.each.head/20-libretools.mk b/build-aux/Makefile.each.head/20-libretools.mk index 20abd8b..be4b8aa 100644 --- a/build-aux/Makefile.each.head/20-libretools.mk +++ b/build-aux/Makefile.each.head/20-libretools.mk @@ -14,7 +14,6 @@ # along with this program. If not, see . pkgconfdir = $(sysconfdir)/libretools.d -pkgdocdir = $(docdir)/libretools pkglibexecdir = $(libexecdir)/libretools # Auto-detect ######################################################## diff --git a/build-aux/Makefile.each.tail/20-libretools.mk b/build-aux/Makefile.each.tail/20-libretools.mk index 49e8fb8..4398e2c 100644 --- a/build-aux/Makefile.each.tail/20-libretools.mk +++ b/build-aux/Makefile.each.tail/20-libretools.mk @@ -26,7 +26,7 @@ files.out.all += $(filter-out $(files.src),$(libretools.out)) \ files.sys.all += $(addprefix $(bindir)/,$(libretools.out.bins)) \ $(addprefix $(pkgconfdir)/,$(libretools.out.confs)) \ $(addprefix $(pkglibexecdir)/,$(libretools.out.libexecs) $(libretools.out.libs)) \ - $(addprefix $(pkgdocdir)/,$(libretools.out.docs)) \ + $(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))) \ @@ -61,7 +61,7 @@ $(outdir)/everything.pot: $(addprefix $(outdir)/,$(addsuffix .pot,$(libretools.p # Install rules ###################################################### $(DESTDIR)$(pkgconfdir)/% : $(outdir)/% ; install -T -Dm644 '$<' '$@' -$(DESTDIR)$(pkgdocdir)/% : $(outdir)/% ; install -T -Dm644 '$<' '$@' +$(DESTDIR)$(docdir)/% : $(outdir)/% ; install -T -Dm644 '$<' '$@' $(DESTDIR)$(mandir)/man1/%.1: $(outdir)/%.1; install -T -Dm644 '$<' '$@' $(DESTDIR)$(mandir)/man2/%.2: $(outdir)/%.2; install -T -Dm644 '$<' '$@' $(DESTDIR)$(mandir)/man3/%.3: $(outdir)/%.3; install -T -Dm644 '$<' '$@' diff --git a/build-aux/Makefile.once.head/00-libretools.mk b/build-aux/Makefile.once.head/00-libretools.mk index 1f2957d..7c1ffef 100644 --- a/build-aux/Makefile.once.head/00-libretools.mk +++ b/build-aux/Makefile.once.head/00-libretools.mk @@ -18,7 +18,6 @@ define mod.libretools.doc # Inputs: # - Install paths (Directory variables): # - `pkgconfdir = $(sysconfdir)/libretools.d` -# - `pkgdocdir = $(docdir)/libretools` # - `pkglibexecdir = $(libexecdir)/libretools` # - Outputs (Directory variables): # - `libretools.out.mans` -- cgit v1.2.3-54-g00ecf From afc6093ea5b87d2d4c870cef7ef66548d3d576ba Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 8 Jul 2017 21:32:08 -0400 Subject: Makefile: rename $(outdir)/everything.pot to $(srcdir)/dir.pot --- Makefile | 2 +- build-aux/Makefile.each.tail/20-libretools.mk | 8 +++----- build-aux/Makefile.once.head/00-libretools.mk | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'build-aux') diff --git a/Makefile b/Makefile index e7b35e4..444a669 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ $(outdir)/shellcheck: cd $(@D)/test && ./testenv $(TESTENVFLAGS) 'cd "$$TMPDIR/destdir" && find \( $(shellcheck.prune) \) -prune -o -not -type d -exec shellcheck $(shellcheck.flags) {} +' _po_rule = \ -po/%(pkg).pot: $(addsuffix /everything.pot,$(pkg.%(pkg))); \ +$(srcdir)/po/%(pkg).pot: $(addsuffix /dir.pot,$(pkg.%(pkg))); \ cat $^ | msguniq -Fi --to-code=UTF-8 > '$@' $(eval $(foreach pkg,$(pkgs),\ $(subst %(pkg),$(pkg),$(value _po_rule))$(at.nl))) diff --git a/build-aux/Makefile.each.tail/20-libretools.mk b/build-aux/Makefile.each.tail/20-libretools.mk index 4398e2c..8902a26 100644 --- a/build-aux/Makefile.each.tail/20-libretools.mk +++ b/build-aux/Makefile.each.tail/20-libretools.mk @@ -22,7 +22,7 @@ endif # Connect with `files` module ######################################## files.src.gen += $(libretools.src.devtools) files.out.all += $(filter-out $(files.src),$(libretools.out)) \ - $(if $(strip $(libretools.pots)),everything.pot) + $(if $(strip $(libretools.pots)),dir.pot) files.sys.all += $(addprefix $(bindir)/,$(libretools.out.bins)) \ $(addprefix $(pkgconfdir)/,$(libretools.out.confs)) \ $(addprefix $(pkglibexecdir)/,$(libretools.out.libexecs) $(libretools.out.libs)) \ @@ -52,11 +52,9 @@ $(outdir)/%: $(srcdir)/%.ronn ronn --roff $(RONNFLAGS) < '$<' > '$@' $(outdir)/%.html: $(srcdir)/%.ronn ronn --html $(RONNFLAGS) < '$<' > '$@' -$(outdir)/%.pot: $(outdir)/% $(topsrcdir)/src/lib/librexgettext +$(srcdir)/%.pot: $(srcdir)/% $(topsrcdir)/src/lib/librexgettext $(topsrcdir)/src/lib/librexgettext $(LIBREXGETTEXT_FLAGS) '$<' > '$@' -$(outdir)/%.pot: $(srcdir)/% $(topsrcdir)/src/lib/librexgettext - $(topsrcdir)/src/lib/librexgettext $(LIBREXGETTEXT_FLAGS) '$<' > '$@' -$(outdir)/everything.pot: $(addprefix $(outdir)/,$(addsuffix .pot,$(libretools.pots))) +$(srcdir)/dir.pot: $(addprefix $(outdir)/,$(addsuffix .pot,$(libretools.pots))) cat $^ | $(libretools.pofmt) > '$@' # Install rules ###################################################### diff --git a/build-aux/Makefile.once.head/00-libretools.mk b/build-aux/Makefile.once.head/00-libretools.mk index 7c1ffef..832649d 100644 --- a/build-aux/Makefile.once.head/00-libretools.mk +++ b/build-aux/Makefile.once.head/00-libretools.mk @@ -61,7 +61,7 @@ define mod.libretools.doc # - Target : `$(outdir)/%.html: $(srcdir)/%.ronn` # - Target : `$(outdir)/%.pot: $(outdir)/%` # - Target : `$(outdir)/%.pot: $(srcdir)/%` -# - Target : `$(outdir)/everything.pot` +# - Target : `$(srcdir)/dir.pot` # - Target : `$(outdir)/%.ugly: $(srcdir)/%.in $(srcdir)/%.patch` # - Target : `$(outdir)/%: $(outdir)/%.ugly # - Target : `$(DESTDIR)...:` -- cgit v1.2.3-54-g00ecf