]> Lady’s Gitweb - Shushe/commitdiff
Add listout target
authorLady <redacted>
Tue, 30 Apr 2024 01:53:06 +0000 (21:53 -0400)
committerLady <redacted>
Tue, 30 Apr 2024 01:53:06 +0000 (21:53 -0400)
Useful for post·processing of files which were installed by ⛩️📰 书社.

Note: There will be plenty of other Make output; use the following to
get just the files :—

    make listout | sed '/^⛩️📰 书社 Output:/!d;s/^⛩️📰 书社 Output://'

GNUmakefile

index 188da55b1bcc25e9d6f4fbe9c9ea9eb5d0022446..90b769f39fcdaf71057caf6d2dcf2146d82830b4 100644 (file)
@@ -68,6 +68,10 @@ override define makefileinfo
 ║│ • `make list´: List all recognized source files and their  │║
 ║│   classification (including media type and dependencies).  │║
 ║│                                                            │║
+║│ • `make listout´: List out the destinations of all         │║
+║│   resulting files (relative to `DESTDIR´), e·g for         │║
+║│   processing by another script.                            │║
+║│                                                            │║
 ║│ • `make uninstall´: Remove installed files, but not        │║
 ║│   `BUILDDIR´.                                              │║
 ║│                                                            │║
@@ -483,6 +487,10 @@ install : $(call installed,$(recursivefiles) $(installablefiles)) ;
 list :
        @$(PRINTF) '%b' $(call quote,$(foreach file,$(sort $(sourcefiles)) $(sort $(sourceincludes)),\0033[1m$(file)\0033[22m|$(call typeoffile,$(file))|[\0033[3m$(if $(filter $(file),$(xmlfiles)),xml,$(if $(filter $(file),$(plaintextfiles)),text,asset))$(if $(filter $(file),$(sourceincludes)),|include,)\0033[23m]$(if $(call dependencies,$(file))$(call recursives,$(file)), $(strip $(foreach recursive,$(call recursives,$(file)),\0033[93;41m•|Recursive|Dependency|\0033[39;49m|$(recursive)) $(foreach dependency,$(call dependencies,$(file)),\0033[2m•|Dependency|\0033[22m|$(dependency))))$(if $(filter $(file),$(sourcefiles)), →|<\0033[4m/$(call destination,$(file))\0033[24m>,) )) | $(TR) ' |' '\n '
 
+# Lists out the destinations of all resulting files (relative to `DESTDIR´).
+listout :
+       @$(PRINTF) '⛩️📰 书社 Output: %s\n' $(call quote,$(foreach file,$(sort $(sourcefiles)),$(call destination,$(file))))
+
 # Destroy installed files.
 uninstall :
        $(foreach file,$(installablefiles),$(if $(wildcard $(call installed,$(file))),$(silent)$(PRINTF) '%s\n' $(call quote,Removing </$(patsubst $(DESTDIR)/%,%,$(call installed,$(file)))>…)$(newline)$(silent)$(RM) -f $(call quote,$(call installed,$(file)))$(newline),))
@@ -503,7 +511,7 @@ FORCE : ;
 .SUFFIXES : ;
 
 # Phony rules; always consider these out·of·date.
-.PHONY : FORCE all default clean gone info install list uninstall $(call built,$(recursivefiles)) ;
+.PHONY : FORCE all default clean gone info install list listout uninstall $(call built,$(recursivefiles)) ;
 
 ifneq ($(typeupdates)$(wildcard $(BUILDDIR)/dependencies)$(wildcard $(BUILDDIR)/destinations),)
 # Reload this make·file if the dependency graph or output destinations have changed.
This page took 0.028761 seconds and 4 git commands to generate.