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
|
.PHONY: images
|
||||||
images:
|
images:
|
||||||
$(MAKE) -C source/_images
|
$(MAKE) -C source/_images
|
||||||
|
$(MAKE) -C source/_images convert
|
||||||
|
|
||||||
.PHONY: reqs
|
.PHONY: reqs
|
||||||
reqs:
|
reqs:
|
||||||
|
|
|
@ -8,24 +8,22 @@ FAKETIME := TZ='Z' faketime -f '2022-01-01 00:00:00 x0,001'
|
||||||
CODE_EXAMPLES := ../code_examples/*/Makefile
|
CODE_EXAMPLES := ../code_examples/*/Makefile
|
||||||
examples: $(CODE_EXAMPLES)
|
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
|
.PHONY: convert
|
||||||
TARG_DOT ?=
|
DOT_FILES := $(shell find . -name *.dot)
|
||||||
convert: $(TARG_DOT:.dot=.pdf) $(TARG_DOT:.dot=.svg)
|
convert: $(DOT_FILES:.dot=.pdf) $(DOT_FILES:.dot=.svg)
|
||||||
|
|
||||||
# use empty FORCE target because .PHONY ignores % expansion, using find allows
|
# use empty FORCE target because .PHONY ignores % expansion
|
||||||
# us to generate everything in one pass, since we don't know all of the possible
|
|
||||||
# outputs until the sub-makes run
|
|
||||||
FORCE:
|
FORCE:
|
||||||
../%/Makefile: FORCE
|
../%/Makefile: FORCE
|
||||||
@make -C $(@D) dots
|
@make -C $(@D) dots
|
||||||
@mkdir -p $*
|
@mkdir -p $*
|
||||||
@find $(@D) -name *.dot -exec cp -u {} -t $* \;
|
@find $(@D) -name *.dot -exec rsync -t {} $* \;
|
||||||
@find $* -name *.dot -printf "%p " | xargs -i make --no-print-directory convert TARG_DOT="{}"
|
|
||||||
|
|
||||||
# find and build all tex files
|
# find and build all tex files
|
||||||
.PHONY: all_tex
|
.PHONY: all_tex
|
||||||
TEX_FILES := $(wildcard **/*.tex)
|
TEX_FILES := $(shell find . -name *.tex)
|
||||||
all_tex: $(TEX_FILES:.tex=.pdf) $(TEX_FILES:.tex=.svg)
|
all_tex: $(TEX_FILES:.tex=.pdf) $(TEX_FILES:.tex=.svg)
|
||||||
|
|
||||||
%.pdf: %.dot
|
%.pdf: %.dot
|
||||||
|
|
Loading…
Reference in New Issue