X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=doc%2Fsrc%2Frtd%2FMakefile;h=3e1721b80243a19c9343bd3592300839484dab5e;hb=52f4bc935a659a9a03cd8749748cf9222b09c878;hp=7e49946a2a9458685b7f33af06af2ce670f016ad;hpb=392168d467d7949f391602f53f9fd62d2a64d12b;p=ric-plt%2Flib%2Frmr.git diff --git a/doc/src/rtd/Makefile b/doc/src/rtd/Makefile index 7e49946..3e1721b 100644 --- a/doc/src/rtd/Makefile +++ b/doc/src/rtd/Makefile @@ -22,26 +22,38 @@ # {X}fm is required to compile the source. -%.rst:: %.xfm +%.rst:: %.xfm man_list.im OUTPUT_TYPE=rst tfm $< | sed 's/^ //' >$@ -%.ps:: %.xfm +%.ps:: %.xfm man_list.im OUTPUT_TYPE=ps pfm $< $@ -%.txt:: %.xfm +%.txt:: %.xfm man_list.im OUTPUT_TYPE=txt tfm $< $@ -%.md:: %.xfm +%.md:: %.xfm man_list.im OUTPUT_TYPE=markdown tfm $< | sed 's/^ //' >$@ docs = config-deploy developer-guide user-guide rel-notes overview -all:: $(docs:%=%.rst) $(docs:%=%.txt) $(docs:%=%.md) - echo ">>> rm rel-notes.xfm" +all:: $(docs:%=%.rst) $(docs:%=%.txt) $(docs:%=%.md) -rel-notes.xfm: +man_list.im:: always + bash gen_man_list.sh >man_list.im + +rel-notes.xfm:: always ksh fmt_changes.ksh >rel-notes.xfm + +# we force the docs to always be out of date so that we don't have to +# manage the list of man pages and other files that are read to generate the +# output needed for RTD. +# +$(docs:%=%.rst): always +$(docs:%=%.txt): always +$(docs:%=%.md): always + + # copy the .rst files which have changed into the docs (plural) directory at the root of the repo publish : $(docs:%=%.rst) for f in *.rst;\ @@ -52,6 +64,16 @@ publish : $(docs:%=%.rst) fi;\ done +# just list what would be published +verify : $(docs:%=%.rst) + for f in *.rst;\ + do\ + if ! diff -N -q $$f ../../../docs/$$f >/dev/null 2>&1;\ + then\ + echo "$$f would be published";\ + fi;\ + done + # ditch any intermediate files clean: rm -f rel-notes.xfm *.sp *.ca @@ -60,3 +82,5 @@ clean: nuke: clean rm -f *.ps *.pdf *.rst *.md +# make hack to force a rule to always be out of date +always: