mirror of
https://codeberg.org/mhwombat/nix-book.git
synced 2026-05-13 18:31:12 +08:00
initial commit
This commit is contained in:
parent
d20855ce97
commit
369bad8563
1 changed files with 2 additions and 2 deletions
4
Makefile
4
Makefile
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
# The operator ‘!=’ is not negation; it executes a shell script and sets a variable to its output.
|
||||
STATIC_ADOC_FILES != find source -name '*.adoc'
|
||||
GENERATED_ADOC_FILES != find source -name '*.adoc0' | sed 's/\.adoc0/.adoc/'
|
||||
GENERATED_ADOC_FILES != find source -name '*.adoc0' | sed 's/\.adoc0/-generated.adoc/'
|
||||
ADOC_FILES = $(STATIC_ADOC_FILES) $(GENERATED_ADOC_FILES)
|
||||
|
||||
MAIN_ADOC_FILE = source/book.adoc
|
||||
|
|
@ -21,7 +21,7 @@ html : index.html
|
|||
# My "run-code-inline" script is available at https://github.com/mhwombat/bin/blob/master/run-code-inline.
|
||||
# We want to treat any paths in commands as relative to the adoc0 file, so we cd to its directory.
|
||||
# The "dir" and "notdir" functions extract the directory and base filename from a path, respectively.
|
||||
%.adoc : %.adoc0
|
||||
%-generated.adoc : %.adoc0
|
||||
> cd $(dir $@); run-code-inline < $(notdir $<) 2>&1 | tee $(notdir $@)
|
||||
|
||||
index.html : $(ADOC_FILES)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue