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 #==================================================================================
19 # This is a stand-alone make file as the RTD documentation is NOT built and packaged
20 # with the normal CMake process and thus isn't covered in the CMake files.
22 # {X}fm is required to compile the source.
26 OUTPUT_TYPE=rst tfm $< | sed 's/^ //' >$@
29 OUTPUT_TYPE=ps pfm $< $@
32 OUTPUT_TYPE=txt tfm $< $@
35 OUTPUT_TYPE=markdown tfm $< | sed 's/^ //' >$@
37 docs = config-deploy developer-guide user-guide rel-notes overview
39 all:: $(docs:%=%.rst) $(docs:%=%.txt) $(docs:%=%.md)
42 ksh fmt_changes.ksh >rel-notes.xfm
44 # copy the .rst files which have changed into the docs (plural) directory at the root of the repo
45 publish : $(docs:%=%.rst)
48 if ! diff -N -q $$f ../../../docs/$$f >/dev/null 2>&1;\
50 cp -p $$f ../../../docs/;\
54 # ditch any intermediate files
56 rm -f rel-notes.xfm *.sp *.ca
58 # ditch anything that can be rebuilt
60 rm -f *.ps *.pdf *.rst *.md