From: Lady Date: Tue, 30 Apr 2024 01:53:06 +0000 (-0400) Subject: Add listout target X-Git-Tag: 0.8.0~2 X-Git-Url: https://git.ladys.computer/Shushe/commitdiff_plain/7774c4b6785613043477b9b05216762e680385fd Add listout target 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://' --- diff --git a/GNUmakefile b/GNUmakefile index 188da55..90b769f 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -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 …)$(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.