3 # ━ § BASIC INFORMATION ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4 override define makefileinfo
5 ╭────────────────────────────╮
6 ╔╡ ⁌ ⛩️📰 书社 ∷ GNUmakefile ╞════════════════════════════════╗
7 ║╰────────────────────────────╯ ║
8 ╟┬ ¶ Prerequisites ───────────────────────────────────────────┬╢
10 ║│ Requires G·N·U Make, at least version 3.81, a version of │║
11 ║│ uuencode with base64 support, and the various programs │║
12 ║│ offered by libxml2 and libxslt. Beyond this, only programs │║
13 ║│ required by Posix are used, altho there is a chance of │║
14 ║│ version incompatibilities. The full list of program │║
15 ║│ requirements is as follows :— │║
23 ║│ • mkdir (requires support for `-p´) │║
32 ║│ • tr (requires support for `-d´) │║
33 ║│ • uuencode (requires support for `-m´ and `-r´) │║
34 ║│ • xmlcatalog (provided by libxml2) │║
35 ║│ • xmllint (provided by libxml2) │║
36 ║│ • xsltproc (provided by libxslt) │║
38 ║│ In all cases, you can supply your own version of any │║
39 ║│ program `program´ by overriding the corresponding variable │║
40 ║│ `PROGRAM´ when calling Make. │║
41 ║╰────────────────────────────────────────────────────────────╯║
42 ╟┬ ¶ Usage ───────────────────────────────────────────────────┬╢
44 ║│ • `make all´: Compile, but do not install, all files. │║
46 ║│ • `make clean´: Remove `BUILDDIR´. │║
48 ║│ • `make gone´: Remove installed files. │║
50 ║│ • `make help´ (default): Print this message. │║
52 ║│ • `make install´: Compile all files and install in │║
55 ║│ • `make list´: List all recognized source files and their │║
56 ║│ classification (including media type and dependencies). │║
58 ║│ Set `VERBOSE=1´ to see the text of commands as they are │║
61 ║│ See `README.markdown´ for a more involved description of │║
62 ║│ the capabilities and configuration of this program. │║
63 ║╰────────────────────────────────────────────────────────────╯║
64 ╟┬ ¶ Copyright & License ─────────────────────────────────────┬╢
66 ║│ Copyright © 2023–2024 Lady [@ Lady’s Computer]. │║
68 ║│ This Source Code Form is subject to the terms of the │║
69 ║│ Mozilla Public License, v 2.0. If a copy of the M·P·L was │║
70 ║│ not distributed with this file, You can obtain one at │║
71 ║│ <http://mozilla.org/MPL/2.0/>. │║
72 ║╰────────────────────────────────────────────────────────────╯║
73 ╚══════════════════════════════════════════════════════════════╝
76 # ━ § MAKE·FILE SETUP ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
78 # Programs needed to run this make·file.
80 # If these are not installed on your computer, or you need to use a
81 # different implementation, you can override the appropriate variable.
99 XMLCATALOG := xmlcatalog
103 # The directory which contains the source files.
105 # Multiple directories can be given so long as files with the same name
106 # do not exist in each.
109 # The directory which contains “includes”: Files which may be included
110 # in other files but for which no final output will be generated.
112 # Multiple directories can be given so long as files with the same name
113 # do not exist in each.
115 # These can be inside of `SRCDIR´ directories if desired.
116 INCLUDEDIR := sources/includes
118 # The directory in which to generate temporary buildfiles.
121 # The directory into which to output files on `make install´.
124 # The location of this Makefile (and related ⛩️📰 书社 files),
125 # relative to the current working directory.
127 # By default, this is inferred from the variable `MAKEFILE_LIST´.
128 THISDIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
130 # The location of the magic files to use when determining media types.
132 # One is provided as part of this repository, but you can override it
133 # if you need different media type detection.
135 # Your computer probably has a more comprehensive one installed at
136 # `/usr/share/file/magic´, but it is not recommended that you use this
137 # directly. Instead, link or copy just the files you expect to need for
139 MAGICDIR := $(patsubst ./%,%,$(THISDIR)/magic)
141 # Configuration of `find´.
143 # By default, `find´ will not follow symlinks and will use extended
144 # regular expressions, ignoring hidden files and those which begin with
147 FINDRULES := -flags -nohidden -and -not -name '.*'
148 FINDINCLUDEOPTS := $(FINDOPTS)
149 FINDINCLUDERULES := $(FINDRULES)
151 # The list of parsers for plaintext file types.
153 # Which parsers are provided will influence which kinds of files are
154 # recognized as plaintext.
156 # Each parser ⁜must⁜ have a template which matches ⁜only⁜ X·H·T·M·L
157 # `<script>´ elements that have a `@type´ of a plaintext type supported
158 # by the parser. They may have multiple.
159 PARSERS := $(patsubst ./%,%,$(wildcard $(THISDIR)/parsers/*.xslt))
161 # The list of transforms.
162 TRANSFORMS := $(patsubst ./%,%,$(wildcard $(THISDIR)/transforms/*.xslt))
164 # List of types which should be treated as X·M·L.
165 XMLTYPES := application/xml text/xml
167 # Set to a non·empty value to print all commands as they run.
170 # The default target for this makefile.
172 # Print help and exit.
173 .DEFAULT_GOAL := help
175 # ━ § BEGIN MAKE·FILE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
177 # ─ ¶ Non‐Recipe Variable Definitions ─────────────────────────────────
179 # A variable with no value, usable when assigning values which contain
183 # A variable which contains a newline, to allow the generation of
184 # multiline strings in function calls.
185 override define newline
190 # A variable which contains a single space.
191 override space := $(empty) $(empty)
193 # A variable which contains a single comma.
196 # (callable) Quote the given string for use within shell calls.
197 override quote = '$(subst ','"'"',$1)'
199 # Outputs an `@´ to silence rules, unless `VERBOSE´ is nonempty.
200 override silent := $(if $(VERBOSE),,@)
202 # (callable) Escape special characters for use in sed regular
204 override sedesc = $(subst /,[/],$(subst $$,\$$,$(subst *,\*,$(subst .,\.,$(subst [,\[,$(subst ^,\^,$(subst \,\\,$1)))))))
206 # (overridable) Collect all of the applicable includes from the
207 # includes directory.
208 sourceincludes := $(shell $(FIND) $(FINDOPTS) $(INCLUDEDIR) -type f '(' $(FINDRULES) ')')
210 # (overridable) Collect all of the applicable source files from the
211 # source directory, removing any which are also includes.
212 sourcefiles := $(filter-out $(sourceincludes),$(shell $(FIND) $(FINDOPTS) $(SRCDIR) -type f '(' $(FINDRULES) ')'))
214 # Figure out the file type of each source file and source include.
215 ifneq ($(wildcard $(BUILDDIR)/magic.mgc),)
216 override types := $(shell $(SED) 's/^ *//;s/ *$$//;s/ {2,}/ /g' <<< $(call quote,$(sourcefiles) $(sourceincludes)) | $(TR) ' ' '\n' | $(FILE) -m $(call quote,$(BUILDDIR)/magic.mgc) --mime-type --separator '`' --files-from - | $(SED) 's/` */?type=/g')
219 # Get the list of supported plaintext file types from the parser.
220 ifneq ($(wildcard $(BUILDDIR)/parser.xslt),)
221 override plaintexttypes := $(filter-out $(XMLTYPES),$(shell $(XSLTPROC) $(call quote,$(THISDIR)/lib/parser2types.xslt) $(call quote,$(BUILDDIR)/parser.xslt)))
224 # (callable) Get all of the files (source and includes) which have the
226 override filesoftype = $(foreach type,$1,$(patsubst %?type=$(type),%,$(filter %?type=$(type),$(types))))
228 # Build up collections of various file types.
229 override xmlfiles := $(call filesoftype,$(XMLTYPES))
230 override plaintextfiles := $(filter-out $(xmlfiles),$(call filesoftype,$(plaintexttypes)))
231 override assetfiles := $(filter-out $(xmlfiles) $(plaintextfiles),$(sourcefiles) $(sourceincludes))
233 # (callable) Get the types of the given files.
234 override typeoffile = $(patsubst $(foreach file,$1,$(file)?type=%),%,$(filter $(foreach file,$1,$(file)?type=%),$(types)))
236 # (callable) Get the identifier for the given transform.
237 override id = $(or $(shell $(XMLLINT) --xpath '/*/*[local-name()="id" and namespace-uri()="urn:fdc:ladys.computer:20231231:Shu1She4"]/text()[1]' $1),$(basename $(notdir $1)))
239 # (callable) Get the local path for the given source file.
240 override sourcepath = $(firstword $(foreach directory,$(SRCDIR),$(if $(filter $(directory)/%,$1),$(patsubst $(directory)/%,%,$1),)))
242 # (callable) Get the local path for the given include.
243 override includepath = $(firstword $(foreach directory,$(INCLUDEDIR),$(if $(filter $(directory)/%,$1),$(patsubst $(directory)/%,%,$1),)))
245 # (callable) Get base64 data u·r·i’s for the given files.
246 override datauri = $(foreach file,$1,data:$(call typeoffile,$(file));base64,$(shell $(UUENCODE) -m -r $(call quote,$(file)) _ | tr -d ' \n'))
248 # (callable) Get local leiris for the given files.
249 override localuri = $(foreach file,$1,$(if $(filter $(file),$(sourceincludes)),about:shushe?include=$(call includepath,$(file)),about:shushe?source=$(call sourcepath,$(file))))
251 # Pair each source file and include with its local u·r·i.
252 override sourcelocalpair = $(foreach file,$(sourcefiles) $(sourceincludes),$(file)`$(call localuri,$(file)))
254 # (callable) Get the source files for the given local leiris.
255 override sourcefile = $(foreach local,$1,$(patsubst %`$(local),%,$(filter %`$(local),$(sourcelocalpair))))
257 # Adds a requirement on `$(BUILDDIR)/.update-types´ if the file is
260 # This file is created after a reload due to type changes, and is
261 # removed after. Requiring it ensures that file classifications are
262 # up‐to‐date immediately after the reload.
263 override typeupdates := $(wildcard $(BUILDDIR)/.update-types)
265 # (callable) Get the location of the transformed X·M·L files for the
266 # given source files.
267 override parsed = $(foreach file,$1,$(if $(filter $(file),$(sourceincludes)),$(BUILDDIR)/includes/$(call includepath,$(file)),$(BUILDDIR)/sources/$(call sourcepath,$(file))))
269 # Pair each source file and include with its parsed location.
270 override sourceparsedpair = $(foreach file,$(sourcefiles) $(sourceincludes),$(file)`$(call parsed,$(file)))
272 # (callable) Get the source files for the given parsed file.
273 override unparsed = $(foreach file,$1,$(patsubst %`$(file),%,$(filter %`$(file),$(sourceparsedpair))))
275 ifneq ($(wildcard $(BUILDDIR)/dependencies),)
276 # Pair each file with a list of dependencies for it.
277 override dependenciesforfile := $(foreach file,$(sourcefiles),$(file)`$(subst $(space),`,$(shell $(CAT) $(call quote,$(BUILDDIR)/dependencies) | $(SED) $(call quote,/^$(call sedesc,$(call localuri,$(file)))$$/$(comma)/^[^ ]/!d;/^ /!d;s/^ //))))
279 # (callable) Get the list of dependency leiris for the given source
282 # Recursive dependencies are marked with a leading `!´.
283 override dependencyuris = $(foreach file,$1,$(subst `, ,$(patsubst $(file)`%,%,$(filter $(file)`%,$(dependenciesforfile)))))
285 # (callable) Get the list of recursive dependencies for the given
287 override recursives = $(foreach uri,$(filter !%,$(call dependencyuris,$1)),$(call sourcefile,$(patsubst !%,%,$(uri))))
289 # (callable) Get the list of (nonrecursive) dependencies for the given
291 override dependencies = $(foreach uri,$(filter-out !%,$(call dependencyuris,$1)),$(call sourcefile,$(uri)))
294 # Collect all files with recursive dependencies.
295 override recursivefiles := $(foreach file,$(filter-out $(assetfiles),$(sourcefiles)),$(if $(call recursives,$(file)),$(file),))
297 # Collect all files which should be compiled.
299 # This is all of the non·asset, nonrecursive files.
300 override compilablefiles := $(filter-out $(assetfiles) $(recursivefiles),$(sourcefiles))
302 # (callable) Get the compiled locations for the given source files.
303 override compiled = $(foreach file,$1,$(BUILDDIR)/public/$(call sourcepath,$(file)))
305 # Pair each source file and include with its compiled location.
306 override sourcecompiledpair = $(foreach file,$(sourcefiles) $(sourceincludes),$(file)`$(call compiled,$(file)))
308 # (callable) Get the source files for the given compiled file.
309 override uncompiled = $(foreach file,$1,$(patsubst %`$(file),%,$(filter %`$(file),$(sourcecompiledpair))))
311 # (callable) Get the installed locations for the given source files.
312 override installed = $(foreach file,$1,$(DESTDIR)/$(call sourcepath,$(file)))
314 # ─ ¶ Recipe Variable Definitions ─────────────────────────────────────
316 # (callable) Check to see if the given directory exists and
318 override ensuredirectory = if $(TEST) ! -d $(call quote,$1); then $(MKDIR) -p $(call quote,$1); fi
320 # (callable) Sanitize and wrap the provided plaintext file in
321 # X·M·L, printing to `stdout´.
322 override wrapplaintext = $(PRINTF) '%s\n' "$$($(PRINTF) '%b' '<?xml version=\042\061.0\042?>\n<script xmlns=\042http://www.w3.org/1999/xhtml\042 type=\042$(patsubst $1?type=%,%,$(filter $1?type=%,$(types)))\042><![CDATA['; $(CAT) $(call quote,$1) | $(TR) '\000\013\014' '\032\011\012' | $(SED) $$($(PRINTF) '%s%b' 's/]]>/]]]]><!\[CDATA\[>/g;s/\xEF\xBF\xBE/�/g;s/\xEF\xBF\xBF/�/g;$$!s/\r$$//g;s/\r/\n/g;$$!s/\xC2\x85$$//g;s/\xC2\x85/\n/g;s/\xE2\x80\xA8/\n/g;' 's/[\0001-\0010]/�/g;s/[\0016-\0037]/�/g'); $(PRINTF) '%s' ']]></script>')"
324 # ─ ¶ Phony Targets ───────────────────────────────────────────────────
328 $(silent)$(PRINTF) '%b' '$(subst $(newline),\n,$(makefileinfo))'
330 # Compile all files, or error if any are recursive.
331 all: $(call compiled,$(recursivefiles) $(compilablefiles) $(filter $(sourcefiles),$(assetfiles))) ;
333 # Destroy buildfiles.
335 $(silent)$(RM) -rf $(BUILDDIR)/
337 # Destroy buildfiles and the install directory.
339 $(silent)$(RM) -rf $(BUILDDIR)/ $(call compiled,$(recursivefiles) $(compilablefiles))
341 # Install the compiled files into `DESTDIR´.
342 install: $(call installed,$(recursivefiles) $(compilablefiles) $(filter $(sourcefiles),$(assetfiles))) ;
344 # List all source files and includes and their computed types.
346 $(silent)$(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)))) )) | $(TR) ' `' '\n '
348 # Raise an error when attempting to build any files with recursive
350 $(call compiled,$(recursivefiles)): $(BUILDDIR)/public/%:
351 @$(PRINTF) '%b\n' $(call quote,\0033[93;41mError:\0033[39;49m `$*´ has recursive dependencies:\n$(subst `, ,$(subst $(space),$(newline),$(foreach recursive,$(call recursives,$(SRCDIR)/$*),•`$(patsubst $(SRCDIR)/%,%,$(recursive)))))) && false
353 # ─ ¶ Special Targets ─────────────────────────────────────────────────
355 # Perform secondary expansion; this enables pattern rules to determine
356 # their prerequisites based on the matched pattern.
359 # Don’t use any implicit rules.
362 # Phony rules; always consider these out‐of‐date.
363 .PHONY: all default clean gone info install list $(call compiled,$(recursivefiles));
365 ifneq ($(wildcard $(BUILDDIR)/.update-types)$(wildcard $(BUILDDIR)/dependencies),)
366 # Reload this make·file if the dependency graph has changed.
368 # This graph is a dependency for some of the variables that this
369 # make·file uses, so it’s important to ensure that they are actually
370 # up‐to‐date prior to executing any later rules.
372 # This recipe only exists after types have been updated or when the
373 # dependency graph already exists.
374 $(THISDIR)/GNUmakefile:: $(BUILDDIR)/dependencies
375 $(silent)$(TOUCH) $(THISDIR)/GNUmakefile
376 $(silent)$(RM) -f $(BUILDDIR)/.update-types
377 @$(PRINTF) '%b\n' '\0033[1mDependency graph updated. Restarting…\0033[22m'
380 ifeq ($(wildcard $(BUILDDIR)/.update-types),)
381 # Reload this make·file if any of the magic files or parsers have
384 # These are used to classify source files, so if they have changed then
385 # the make·file must be reloaded.
387 # This recipe sleeps for one second to ensure that files built after
388 # the restart have a more current time·stamp.
389 $(THISDIR)/GNUmakefile:: $(BUILDDIR)/magic.mgc $(BUILDDIR)/parser.xslt $(THISDIR)/lib/parser2types.xslt
390 $(silent)$(TOUCH) $(THISDIR)/GNUmakefile
391 $(silent)$(RM) -f $(call quote,$(BUILDDIR)/dependencies)
392 @$(PRINTF) '%b\n' '\0033[1mMagic file or parsers have updated. Restarting…\0033[22m'
394 $(silent)$(TOUCH) $(call quote,$(BUILDDIR)/.update-types)
397 # ─ ¶ Build Targets ───────────────────────────────────────────────────
399 # Generate the compiled magic file from its sources.
401 # It must be updated if any of the files in the magic directory change.
402 # It ⁜also⁜ should be updated if any of the files in the magic
403 # directory are deleted, but this isn’t tracked presently.
404 $(BUILDDIR)/magic.mgc: $(wildcard $(MAGICDIR)/*)
405 @$(ECHO) "Compiling new magic…"
406 $(silent)$(call ensuredirectory,$(dir $@))
407 $(silent)cd $(call quote,$(BUILDDIR)) && $(FILE) -C -m $(call quote,$(realpath $(MAGICDIR)))
409 # Generate the main parser.
410 $(BUILDDIR)/parser.catalog: $(PARSERS)
411 @$(ECHO) "Generating catalog of parsers…"
412 $(silent)$(XMLCATALOG) --create --noout $(call quote,$@)
413 $(foreach parser,$(PARSERS),$(silent)$(XMLCATALOG) --add uri $(call quote,$(call id,$(parser))) $(call quote,../$(parser)) --noout $(call quote,$@)$(newline))
414 $(BUILDDIR)/parser.xslt: $(BUILDDIR)/parser.catalog $(THISDIR)/lib/catalog2parser.xslt
415 @$(ECHO) "Generating main parser…"
416 $(silent)$(XSLTPROC) -o $(call quote,$@) $(call quote,$(THISDIR)/lib/catalog2parser.xslt) $(call quote,$<)
420 # Even plain X·M·L files are parsed, because they may contain X·H·T·M·L
421 # `<script>´ elements which contain other kinds of data. Asset files
422 # are turned into H·T·M·L embeds pointing to `data:´ U·R·I’s.
423 $(call parsed,$(sourcefiles) $(sourceincludes)): %: $$(call unparsed,$$@) $(typeupdates)
424 @$(PRINTF) '%s\n' $(call quote,Processing `$<´…)
425 $(silent)$(call ensuredirectory,$(dir $@))
426 $(silent)$(if $(filter $<,$(assetfiles)),$(PRINTF) '%s\n' $(call quote,<object xmlns="http://www.w3.org/1999/xhtml" type="$(call typeoffile,$<)" data="$(call datauri,$<)"/>) > $(call quote,$@),$(if $(filter $<,$(plaintextfiles)),$(call wrapplaintext,$<),$(CAT) $(call quote,$<)) | $(XSLTPROC) -o $(call quote,$@) $(call quote,$(BUILDDIR)/parser.xslt) -)
428 # Generate a catalog of all transformed files, for use when processing
429 # includes. This does not depend on actually transforming the files.
430 $(BUILDDIR)/catalog: $(sourcefiles) $(sourceincludes) $(typeupdates)
431 @$(ECHO) "Generating catalog of parsed files…"
432 $(silent)$(XMLCATALOG) --create --noout $(call quote,$@)
433 $(foreach source,$(sourcefiles) $(sourceincludes),$(silent)$(XMLCATALOG) --add uri $(call quote,$(call localuri,$(source))) $(call quote,$(patsubst $(BUILDDIR)/%,%,$(call parsed,$(source)))#$(if $(filter $(source),$(assetfiles)),asset,xml)) --noout $(call quote,$@)$(newline))
435 # Build a list of dependencies for each transformed file.
436 $(BUILDDIR)/dependencies: $(BUILDDIR)/catalog $(call parsed,$(plaintextfiles) $(xmlfiles)) $(THISDIR)/lib/catalog2dependencies.xslt
437 @$(ECHO) "Identifying dependencies…"
438 $(silent)$(XSLTPROC) -o $(call quote,$@) $(call quote,$(THISDIR)/lib/catalog2dependencies.xslt) $(call quote,$<)
440 # Generate the main transform.
441 $(BUILDDIR)/transform.catalog: $(TRANSFORMS)
442 @$(ECHO) "Generating catalog of transforms…"
443 $(silent)$(XMLCATALOG) --create --noout $(call quote,$@)
444 $(foreach transform,$(TRANSFORMS),$(silent)$(XMLCATALOG) --add uri $(call quote,$(call id,$(transform))) $(call quote,../$(transform)) --noout $(call quote,$@)$(newline))
445 $(BUILDDIR)/transform.xslt: $(BUILDDIR)/transform.catalog $(THISDIR)/lib/catalog2transform.xslt
446 @$(ECHO) "Generating main transform…"
447 $(silent)$(XSLTPROC) -o $(call quote,$@) $(call quote,$(THISDIR)/lib/catalog2transform.xslt) $(call quote,$<)
449 # Generate the output files using the dependencies as necessary.
450 $(call compiled,$(compilablefiles)): $(BUILDDIR)/public/%: $$(call parsed,$$(call uncompiled,$$@)) $(BUILDDIR)/transform.xslt $$(call parsed,$$(call dependencies,$$(call uncompiled,$$@)))
451 $(silent)$(call ensuredirectory,$(dir $@))
452 @$(PRINTF) '%s\n' $(call quote,Compiling </$*>…)
453 $(silent)$(XSLTPROC) -o $(call quote,$@) --stringparam catalog 'catalog' --stringparam buildtime '$(shell TZ= $(DATE) '+%Y-%m-%dT%H:%M:%SZ')' --stringparam srctime '$(shell TZ= $(STAT) -f '%Sm' -t '%Y-%m-%dT%H:%M:%SZ' $(call quote,$(call uncompiled,$@)))' --stringparam path $(call quote,/$*) $(call quote,$(BUILDDIR)/transform.xslt) $(call quote,$<)
454 $(call compiled,$(filter $(assetfiles),$(sourcefiles))): $(BUILDDIR)/public/%: $$(call uncompiled,$$@)
455 @$(PRINTF) '%s\n' $(call quote,Compiling </$*>…)
456 $(silent)$(call ensuredirectory,$(dir $@))
457 $(silent)$(CP) $(call quote,$<) $(call quote,$@)
459 # Install compiled files (or error in the case of recursive ones).
460 $(call installed,$(filter $(assetfiles),$(sourcefiles)) $(recursivefiles) $(compilablefiles)): $(DESTDIR)/%: $(BUILDDIR)/public/%
461 @$(PRINTF) '%s\n' $(call quote,Installing </$*>…)
462 $(silent)$(call ensuredirectory,$(dir $@))
463 $(silent)$(CP) $(call quote,$<) $(call quote,$@)