diff options
Diffstat (limited to 'make')
-rwxr-xr-x | make/emd2exml.in | 2 | ||||
-rwxr-xr-x | make/fakefop | 18 | ||||
-rw-r--r-- | make/otp.mk.in | 11 | ||||
-rw-r--r-- | make/otp_release_targets.mk | 45 | ||||
-rw-r--r-- | make/otp_subdir.mk | 4 | ||||
-rw-r--r-- | make/run_make.mk | 6 |
6 files changed, 53 insertions, 33 deletions
diff --git a/make/emd2exml.in b/make/emd2exml.in index b4e052fef5..13bd6700d9 100755 --- a/make/emd2exml.in +++ b/make/emd2exml.in @@ -1,6 +1,6 @@ #!@ENV@ escript %% -*- erlang -*- -%%! -smp disable +%%! %% %% %CopyrightBegin% diff --git a/make/fakefop b/make/fakefop index 7beeddf0a5..7a34c4faf1 100755 --- a/make/fakefop +++ b/make/fakefop @@ -22,13 +22,13 @@ # Author: Tuncer Ayaz # -if [ $# -lt 6 ] +if [ $# -lt 8 ] then - echo "Usage: fakefop -c IGNORED -fo IGNORED -pdf OUTFILE" + echo "Usage: fakefop -c IGNORED -cache IGNORED -fo IGNORED -pdf OUTFILE" exit 1 fi -OUTFILE=$6 +OUTFILE=$8 echo -n -e '%PDF-1.4\n%\0342\0343\0317\0323\n\n' > $OUTFILE @@ -87,12 +87,12 @@ endobj xref 0 6 -0000000000 65536 f -0000000016 00000 n -0000000070 00000 n -0000000136 00000 n -0000000291 00000 n -0000000410 00000 n +0000000000 65536 f +0000000016 00000 n +0000000070 00000 n +0000000136 00000 n +0000000291 00000 n +0000000410 00000 n trailer << diff --git a/make/otp.mk.in b/make/otp.mk.in index 7e2945b561..b06c51d0fb 100644 --- a/make/otp.mk.in +++ b/make/otp.mk.in @@ -47,6 +47,10 @@ CROSS_COMPILING = @CROSS_COMPILING@ # ---------------------------------------------------- DEFAULT_TARGETS = opt debug release release_docs clean docs +DEFAULT_FLAVOR=@DEFAULT_FLAVOR@ +FLAVORS=@FLAVORS@ +TYPES=@TYPES@ + # Slash separated list of return values from $(origin VAR) # that are untrusted - set default in this file instead. # The list is not space separated since some return values @@ -134,7 +138,7 @@ endif # .PRECIOUS: %.erl %.fo -## Uncomment these lines and add .idl to suffixes above to have erlc +## Uncomment these lines and add .idl to suffixes above to have erlc ## eat IDL files ##$(EGEN)/%.erl: $(ESRC)/%.idl ## $(ERLC) $(IDL_FLAGS) $< @@ -234,7 +238,7 @@ ifeq ($(PDFCOLOR),) PDFCOLOR = \#960003 endif -# HTML & GIF files that always are generated and must be delivered +# HTML & GIF files that always are generated and must be delivered SGML_COLL_FILES = $(SGML_APPLICATION_FILES) $(SGML_PART_FILES) XML_COLL_FILES = $(XML_APPLICATION_FILES) $(XML_PART_FILES) DEFAULT_HTML_FILES = \ @@ -322,5 +326,4 @@ $(MAN9DIR)/%.9: %.xml escript $(DOCGEN)/priv/bin/codeline_preprocessing.escript $< $@ .fo.pdf: - $(FOP) -c $(FOP_CONFIG) -fo $< -pdf $@ - + $(FOP) -c $(FOP_CONFIG) -cache $(ERL_TOP)/make/$(TARGET)/fop-fonts.cache -fo $< -pdf $@ diff --git a/make/otp_release_targets.mk b/make/otp_release_targets.mk index 13b54645ad..23b4416963 100644 --- a/make/otp_release_targets.mk +++ b/make/otp_release_targets.mk @@ -94,6 +94,8 @@ $(HTMLDIR)/users_guide.html: $(XML_FILES) # ------------------------------------------------------------------------ # The following targets just exist in the documentation directory # ------------------------------------------------------------------------ +.PHONY: xmllint + ifneq ($(XML_FILES),) # ---------------------------------------------------- @@ -108,21 +110,38 @@ $(HTMLDIR)/$(APPLICATION).eix: $(XML_FILES) $(SPECS_FILES) -xinclude $(TOP_SPECS_PARAM) \ -path $(DOCGEN)/priv/dtd \ -path $(DOCGEN)/priv/dtd_html_entities \ - $(DOCGEN)/priv/xsl/db_eix.xsl book.xml > $@ + $(DOCGEN)/priv/xsl/db_eix.xsl book.xml > $@ docs: $(HTMLDIR)/$(APPLICATION).eix -xmllint: $(XML_FILES) - @echo "Running xmllint" - @BookFiles=`awk -F\" '/xi:include/ {print $$2}' book.xml`; \ - for i in $$BookFiles; do \ - if [ $$i = "notes.xml" ]; then \ - echo Checking $$i; \ - xmllint --noout --valid --nodefdtd --loaddtd --path $(DOCGEN)/priv/dtd:$(DOCGEN)/priv/dtd_html_entities $$i; \ - else\ - awk -F\" '/xi:include/ {print "echo Checking " $$2 ;print "xmllint --noout --valid --nodefdtd --loaddtd --path $(DOCGEN)/priv/dtd:$(DOCGEN)/priv/dtd_html_entities:$(XMLLINT_SRCDIRS) " $$2}' $$i |sh; \ - fi \ - done +## Here awk is used to find all xi:include files in $(BOOK_FILES) +## Then we look into all those files check for xi:includes +BOOK_XI_INC_FILES:=$(foreach file,$(BOOK_FILES),$(shell awk -F\" '/xi:include/ {print $$2}' $(file))) $(BOOK_FILES) +ALL_XI_INC_FILES:=$(foreach file,$(BOOK_XI_INC_FILES),$(shell awk -F\" '/xi:include/ {if ("$(dir $(file))" != "./") printf "$(dir $(file))"; print $$2}' $(file))) $(BOOK_XI_INC_FILES) + +## These are the patterns of file names that xmllint cannot currently parse +XI_INC_FILES:=%user_man.xml %usersguide.xml %refman.xml %ref_man.xml %part.xml %book.xml + +## These are the files that we should run the xmllint on +LINT_XI_INC_FILES := $(filter-out $(XI_INC_FILES), $(ALL_XI_INC_FILES)) + +EMPTY := +SPACE := $(EMPTY) $(EMPTY) +XMLLINT_SRCDIRS:=$(subst $(SPACE),:,$(sort $(foreach file,$(XML_FILES),$(dir $(file))))) + +xmllint: $(ALL_XI_INC_FILES) +## We verify that the $(XML_FILES) variable in the Makefile have exactly +## the same files as we found out by following xi:include. +ifneq ($(filter-out $(filter %.xml,$(XML_FILES)),$(ALL_XI_INC_FILES)),) + $(error "$(filter-out $(filter %.xml,$(XML_FILES)),$(ALL_XI_INC_FILES)) in $$ALL_XI_INC_FILES but not in $$XML_FILES"); +endif +ifneq ($(filter-out $(ALL_XI_INC_FILES),$(filter %.xml,$(XML_FILES))),) + $(error "$(filter-out $(ALL_XI_INC_FILES),$(filter %.xml,$(XML_FILES))) in $$XML_FILES but not in $$ALL_XI_INC_FILES"); +endif + @echo "xmllint $(LINT_XI_INC_FILES)" + @xmllint --noout --valid --nodefdtd --loaddtd --path \ + $(DOCGEN)/priv/dtd:$(DOCGEN)/priv/dtd_html_entities:$(XMLLINT_SRCDIRS) \ + $(LINT_XI_INC_FILES) # ---------------------------------------------------- # Local documentation target for testing @@ -143,6 +162,8 @@ local_copy_of_topdefs: $(DOCGEN)/priv/js/flipmenu/flip_static.gif \ $(DOCGEN)/priv/js/flipmenu/flipmenu.js $(HTMLDIR)/js/flipmenu +else +xmllint: endif # ---------------------------------------------------- diff --git a/make/otp_subdir.mk b/make/otp_subdir.mk index fa6470ddd7..19c744955c 100644 --- a/make/otp_subdir.mk +++ b/make/otp_subdir.mk @@ -19,13 +19,13 @@ # # Make include file for otp -.PHONY: debug opt release docs release_docs tests release_tests \ +.PHONY: debug opt lcnt release docs release_docs tests release_tests \ clean depend valgrind static_lib # # Targets that don't affect documentation directories # -opt debug release docs release_docs tests release_tests clean depend valgrind static_lib: +opt debug lcnt release docs release_docs tests release_tests clean depend valgrind static_lib xmllint: @set -e ; \ app_pwd=`pwd` ; \ if test -f vsn.mk; then \ diff --git a/make/run_make.mk b/make/run_make.mk index 2591a37cad..bcbbf53f7d 100644 --- a/make/run_make.mk +++ b/make/run_make.mk @@ -38,9 +38,5 @@ plain smp frag smp_frag: $(make_verbose)$(MAKE) -f $(TARGET)/Makefile FLAVOR=$@ clean generate depend docs release release_spec release_docs release_docs_spec \ - tests release_tests release_tests_spec static_lib: + tests release_tests release_tests_spec static_lib xmllint: $(make_verbose)$(MAKE) -f $(TARGET)/Makefile $@ - - - - |