forked from commoncriteria/transforms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfigAnnex.make
51 lines (40 loc) · 1.41 KB
/
ConfigAnnex.make
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# This file is intentially not called [Mm]akefile, because it is not meant to be called
# directly. Rather the project directory should have a "Makefile" that
# defines all the environment variables then includes this one.
# For example:
# ```
# TRANS?=transforms
# include $(TRANS)/ConfigAnnex.make
# ```
#---
#- Config Annex Build targets
#---
#- Path to input files
IN ?= input
#- Path where output files are written
OUT ?= output
#- FPath
TRANS ?= transforms
#- Debugging levels '','v','vv' make sense right now.
DEBUG ?= v
#- XSL containing templates common to the other transforms
PPCOMMONS_XSL ?= $(TRANS)/ppcommons.xsl
#- Path to input XML document for the config annex
CONFIGANNEX_XML ?= $(IN)/configannex.xml
#- XSL that creates regular config annex document
CONFIGANNEX2HTML_XSL ?= $(TRANS)/configannex2html.xsl
#- Path where the config annex is written
CONFIGANNEX_HTML ?= $(OUT)/configannex.html
#- Your xsl transformer.
#- It should be at least XSL level-1 compliant.
#- It should be able to handle commands of the form
#- $XSL_EXE [--string-param <param-name> <param-value>]* -o <output> <xsl-file> <input>
XSL_EXE ?= xsltproc --stringparam debug '$(DEBUG)'
#---
#- Build targets
#---
#- Builds all
default: all $(CONFIGANNEX_HTML)
#- Build Config Annex
$(CONFIGANNEX_HTML): $(CONFIGANNEX2HTML_XSL) $(PPCOMMONS_XSL) $(CONFIGANNEX_XML)
$(XSL_EXE) -o $(CONFIGANNEX_HTML) $(CONFIGANNEX2HTML_XSL) $(CONFIGANNEX_XML)