mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-12 20:18:20 +00:00
Makefile: Separate docs/usage stderr and stdout
This commit is contained in:
parent
1c09862ad9
commit
d4b6042e43
25
Makefile
25
Makefile
|
@ -985,16 +985,27 @@ docs/gen_images:
|
||||||
$(Q) $(MAKE) -C docs images
|
$(Q) $(MAKE) -C docs images
|
||||||
|
|
||||||
DOCS_GUIDELINE_FILES := GettingStarted CodingStyle
|
DOCS_GUIDELINE_FILES := GettingStarted CodingStyle
|
||||||
docs/guidelines:
|
docs/guidelines docs/source/temp:
|
||||||
$(Q) mkdir -p docs/source/temp
|
$(Q) mkdir -p docs/source/temp
|
||||||
$(Q) cp -f $(addprefix guidelines/,$(DOCS_GUIDELINE_FILES)) docs/source/temp
|
$(Q) cp -f $(addprefix guidelines/,$(DOCS_GUIDELINE_FILES)) docs/source/temp
|
||||||
|
|
||||||
# many of these will return an error which can be safely ignored, so we prefix
|
# some commands return an error and print the usage text to stderr
|
||||||
# the command with a '-'
|
define DOC_USAGE_STDERR
|
||||||
DOCS_USAGE_PROGS := yosys yosys-config yosys-filterlib yosys-abc yosys-smtbmc yosys-witness
|
docs/source/temp/$(1): $(PROGRAM_PREFIX)$(1) docs/source/temp
|
||||||
docs/usage: $(addprefix docs/source/temp/,$(DOCS_USAGE_PROGS))
|
-$(Q) ./$$< --help 2> $$@
|
||||||
docs/source/temp/%: docs/guidelines
|
endef
|
||||||
-$(Q) ./$(PROGRAM_PREFIX)$* --help > $@ 2>&1
|
DOCS_USAGE_STDERR := yosys-config yosys-filterlib yosys-abc
|
||||||
|
$(foreach usage,$(DOCS_USAGE_STDERR),$(eval $(call DOC_USAGE_STDERR,$(usage))))
|
||||||
|
|
||||||
|
# others print to stdout
|
||||||
|
define DOC_USAGE_STDOUT
|
||||||
|
docs/source/temp/$(1): $(PROGRAM_PREFIX)$(1) docs/source/temp
|
||||||
|
$(Q) ./$$< --help > $$@
|
||||||
|
endef
|
||||||
|
DOCS_USAGE_STDOUT := yosys yosys-smtbmc yosys-witness
|
||||||
|
$(foreach usage,$(DOCS_USAGE_STDOUT),$(eval $(call DOC_USAGE_STDOUT,$(usage))))
|
||||||
|
|
||||||
|
docs/usage: $(addprefix docs/source/temp/,$(DOCS_USAGE_STDOUT) $(DOCS_USAGE_STDERR))
|
||||||
|
|
||||||
docs/reqs:
|
docs/reqs:
|
||||||
$(Q) $(MAKE) -C docs reqs
|
$(Q) $(MAKE) -C docs reqs
|
||||||
|
|
Loading…
Reference in a new issue