mk: fix pdf doc rules order

Re-ordered the guide-pdf-% and guide-% rules to allow
the doc-guides-pdf target to build with make 3.81. It
builds unmodified with all later versions of make.

Fixes: ebf8050afd ("doc: add pdf output")

Reported-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This commit is contained in:
John McNamara 2015-04-01 12:32:45 +01:00 committed by Thomas Monjalon
parent b5a1f1ae2f
commit 2b1a550910

View File

@ -85,21 +85,15 @@ api-html-clean:
$(Q)rm -f $(RTE_OUTPUT)/doc/html/api/* $(Q)rm -f $(RTE_OUTPUT)/doc/html/api/*
$(Q)rmdir -p --ignore-fail-on-non-empty $(RTE_OUTPUT)/doc/html/api 2>&- || true $(Q)rmdir -p --ignore-fail-on-non-empty $(RTE_OUTPUT)/doc/html/api 2>&- || true
guides-%-clean:
$(Q)rm -rf $(RTE_OUTPUT)/doc/$*/guides
$(Q)rmdir -p --ignore-fail-on-non-empty $(RTE_OUTPUT)/doc/$* 2>&- || true
guides-pdf-clean: guides-pdf-img-clean guides-pdf-clean: guides-pdf-img-clean
guides-pdf-img-clean: guides-pdf-img-clean:
$(Q)rm -f $(RTE_SDK)/doc/guides/*/img/*.pdf $(Q)rm -f $(RTE_SDK)/doc/guides/*/img/*.pdf
guides-pdf: $(addprefix guides-pdf-, $(notdir $(RTE_GUIDES:/=))) ; guides-%-clean:
guides-%: $(Q)rm -rf $(RTE_OUTPUT)/doc/$*/guides
@echo 'sphinx processing $@...' $(Q)rmdir -p --ignore-fail-on-non-empty $(RTE_OUTPUT)/doc/$* 2>&- || true
$(Q)$(RTE_SPHINX_BUILD) -b $* $(RTE_SPHINX_VERBOSE) \
-c $(RTE_SDK)/doc/guides $(RTE_SDK)/doc/guides \
$(RTE_OUTPUT)/doc/$*/guides
guides-pdf: $(addprefix guides-pdf-, $(notdir $(RTE_GUIDES:/=))) ;
guides-pdf-%: guides-pdf-%:
@echo 'sphinx processing $@...' @echo 'sphinx processing $@...'
$(Q)$(RTE_SPHINX_BUILD) -b latex $(RTE_SPHINX_VERBOSE) \ $(Q)$(RTE_SPHINX_BUILD) -b latex $(RTE_SPHINX_VERBOSE) \
@ -112,6 +106,12 @@ guides-pdf-%:
$(Q)mv $(RTE_OUTPUT)/doc/pdf/guides/$*/doc.pdf \ $(Q)mv $(RTE_OUTPUT)/doc/pdf/guides/$*/doc.pdf \
$(RTE_OUTPUT)/doc/pdf/guides/$*.pdf $(RTE_OUTPUT)/doc/pdf/guides/$*.pdf
guides-%:
@echo 'sphinx processing $@...'
$(Q)$(RTE_SPHINX_BUILD) -b $* $(RTE_SPHINX_VERBOSE) \
-c $(RTE_SDK)/doc/guides $(RTE_SDK)/doc/guides \
$(RTE_OUTPUT)/doc/$*/guides
# Each PDF depends on generated images *.pdf from *.svg # Each PDF depends on generated images *.pdf from *.svg
$(foreach guide, $(RTE_GUIDES), $(foreach img, $(wildcard $(guide)img/*.svg), \ $(foreach guide, $(RTE_GUIDES), $(foreach img, $(wildcard $(guide)img/*.svg), \
$(eval guides-pdf-$(notdir $(guide:/=)): $(img:svg=pdf)))) $(eval guides-pdf-$(notdir $(guide:/=)): $(img:svg=pdf))))