mirror of https://github.com/YosysHQ/yosys.git
Docs: macos-safe build
Swap `cp -u` for `rsync -t`. Drop the workaround to get the list of dot files after copying them, and instead just run the makefile twice. Swap `$(wildcard **/*.x)` for `$(shell find . -name *.x)`,
This commit is contained in:
parent
0b53b10770
commit
5d5d890d5b
|
@ -250,6 +250,7 @@ test-macros:
|
|||
.PHONY: images
|
||||
images:
|
||||
$(MAKE) -C source/_images
|
||||
$(MAKE) -C source/_images convert
|
||||
|
||||
.PHONY: reqs
|
||||
reqs:
|
||||
|
|
|
@ -8,24 +8,22 @@ FAKETIME := TZ='Z' faketime -f '2022-01-01 00:00:00 x0,001'
|
|||
CODE_EXAMPLES := ../code_examples/*/Makefile
|
||||
examples: $(CODE_EXAMPLES)
|
||||
|
||||
# target to convert specified dot file(s)
|
||||
# target to convert all dot files
|
||||
# needs to be run *after* examples, otherwise no dot files will be found
|
||||
.PHONY: convert
|
||||
TARG_DOT ?=
|
||||
convert: $(TARG_DOT:.dot=.pdf) $(TARG_DOT:.dot=.svg)
|
||||
DOT_FILES := $(shell find . -name *.dot)
|
||||
convert: $(DOT_FILES:.dot=.pdf) $(DOT_FILES:.dot=.svg)
|
||||
|
||||
# use empty FORCE target because .PHONY ignores % expansion, using find allows
|
||||
# us to generate everything in one pass, since we don't know all of the possible
|
||||
# outputs until the sub-makes run
|
||||
# use empty FORCE target because .PHONY ignores % expansion
|
||||
FORCE:
|
||||
../%/Makefile: FORCE
|
||||
@make -C $(@D) dots
|
||||
@mkdir -p $*
|
||||
@find $(@D) -name *.dot -exec cp -u {} -t $* \;
|
||||
@find $* -name *.dot -printf "%p " | xargs -i make --no-print-directory convert TARG_DOT="{}"
|
||||
@find $(@D) -name *.dot -exec rsync -t {} $* \;
|
||||
|
||||
# find and build all tex files
|
||||
.PHONY: all_tex
|
||||
TEX_FILES := $(wildcard **/*.tex)
|
||||
TEX_FILES := $(shell find . -name *.tex)
|
||||
all_tex: $(TEX_FILES:.tex=.pdf) $(TEX_FILES:.tex=.svg)
|
||||
|
||||
%.pdf: %.dot
|
||||
|
|
Loading…
Reference in New Issue