make/CompileToolsJdk.gmk
branchihse-manpages-branch
changeset 57045 9c7f4a3c4139
parent 52175 c2672a0f233a
child 57048 b2ed864c52b5
equal deleted inserted replaced
57044:37a5eb9384d3 57045:9c7f4a3c4139
    27 
    27 
    28 include $(SPEC)
    28 include $(SPEC)
    29 include MakeBase.gmk
    29 include MakeBase.gmk
    30 include JavaCompilation.gmk
    30 include JavaCompilation.gmk
    31 include SetupJavaCompilers.gmk
    31 include SetupJavaCompilers.gmk
       
    32 include TextFileProcessing.gmk
    32 
    33 
    33 ################################################################################
    34 ################################################################################
    34 
    35 
    35 $(eval $(call IncludeCustomExtension, CompileTools.gmk))
    36 $(eval $(call IncludeCustomExtension, CompileTools.gmk))
    36 
    37 
    85 
    86 
    86 TARGETS += $(COMPILE_DEPEND) $(DEPEND_SERVICE_PROVIDER)
    87 TARGETS += $(COMPILE_DEPEND) $(DEPEND_SERVICE_PROVIDER)
    87 
    88 
    88 ################################################################################
    89 ################################################################################
    89 
    90 
       
    91 # To be able to call the javascript filter when generating man pages using
       
    92 # pandoc, we need to create this executable wrapper script.
       
    93 ifneq ($(PANDOC), )
       
    94   # PANDOC_FILTER is duplicated for export in ToolsJdk.gmk.
       
    95   PANDOC_FILTER := $(BUILDTOOLS_OUTPUTDIR)/manpages/pandoc-manpage-filter
       
    96   PANDOC_FILTER_SETUP := $(BUILDTOOLS_OUTPUTDIR)/manpages/_pandoc_filter_setup.marker
       
    97 
       
    98   # Create a usable instance of the wrapper script that calls the pandoc filter
       
    99   # (which is written in javascript).
       
   100   $(eval $(call SetupTextFileProcessing, CREATE_PANDOC_FILTER, \
       
   101       SOURCE_FILES := $(TOPDIR)/make/scripts/pandoc-manpage-filter.sh.template, \
       
   102       OUTPUT_FILE := $(PANDOC_FILTER), \
       
   103       REPLACEMENTS := \
       
   104           @@BOOT_JDK@@ => $(BOOT_JDK) ; \
       
   105           @@TOPDIR@@ => $(TOPDIR) ; \
       
   106           @@JJS_FLAGS@@ => $(addprefix -J, $(JAVA_FLAGS_SMALL)), \
       
   107   ))
       
   108 
       
   109   # Created script must be made executable
       
   110   $(PANDOC_FILTER_SETUP): $(CREATE_PANDOC_FILTER)
       
   111 		$(CHMOD) a+rx $(PANDOC_FILTER)
       
   112 		$(TOUCH) $@
       
   113 
       
   114   TARGETS += $(PANDOC_FILTER_SETUP)
       
   115 endif
       
   116 
    90 all: $(TARGETS)
   117 all: $(TARGETS)