2 #==================================================================================
3 # Copyright (c) 2019 Nokia
4 # Copyright (c) 2018-2019 AT&T Intellectual Property.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 #==================================================================================
23 OUTPUT_TYPE=markdown tfm $< stdout | sed 's/^ //' >$@
26 OUTPUT_TYPE=rst tfm $< stdout | sed 's/^ //' >$@
29 OUTPUT_TYPE=txt tfm $< stdout
30 OUTPUT_TYPE=txt tfm $< $@
33 gs -dQUIET -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=$@ $<
35 src = user.xfm advanced_use.im api_qref.im code_appendix.im code_send.im config.im failures.im general_use.im glossary.im index_snatch.im setup.im mbuf.im front_junk.im license.im
36 code_src = $(shell ls code_*.im)
38 all: user.pdf user.txt user.rst user.md
40 # two pass build for pfm to allow for toc insertion
41 user.ps: $(src) $(code_src)
42 XFM_PASS=1 pfm $< /dev/null
45 user.md: $(src) $(code_src)
46 OUTPUT_TYPE=markdown XFM_PASS=1 tfm $< /dev/null
47 OUTPUT_TYPE=markdown XFM_PASS=2 tfm $< $@
49 user.rst: $(src) $(code_src)
50 OUTPUT_TYPE=rst XFM_PASS=1 tfm $< /dev/null
51 OUTPUT_TYPE=rst XFM_PASS=2 tfm $< $@
53 user.txt: $(src) $(code_src)
54 OUTPUT_TYPE=txt XFM_PASS=1 tfm $< /dev/null
55 OUTPUT_TYPE=txt XFM_PASS=2 tfm $< $@
57 # intermeidate junk that might straggle
59 rm -fr *.bcnfile *.ca *.ecnfile
61 # Anything that can be built
63 rm -fr *.ps *.pdf *.txt *.rst