| 1 |
.PHONY: all |
| 2 |
all: html crystal-facet-uml_documentation.pdf crystal-facet-uml.1.gz info |
| 3 |
|
| 4 |
SOURCE=../../documentation/user_manual |
| 5 |
|
| 6 |
crystal-facet-uml_documentation.pdf: ${SOURCE}/*.xml ${SOURCE}/2_feature_gallery_export/*.pdf ${SOURCE}/*.svg ${SOURCE}/*.png ${SOURCE}/4_stereotypes/*.* ${SOURCE}/5_modeling_hints_export/*.svg |
| 7 |
echo "you may need to install sudo zypper install rsvg-convert or sudo apt install librsvg2-bin" &&\ |
| 8 |
echo "PLEASE UPDATE DIAGRAMS IN ../../user_doc/doc/2_feature_gallery_export/ MANUALLY" &&\ |
| 9 |
dblatex -c use_rsvg-convert.conf -p xsl_params.xsl --type=pdf ${SOURCE}/crystal-facet-uml_documentation.xml --output=./crystal-facet-uml_documentation.pdf |
| 10 |
|
| 11 |
html: ${SOURCE}/*.xml ${SOURCE}/2_feature_gallery_export/*.png ${SOURCE}/*.png ${SOURCE}/*.svg ${SOURCE}/4_stereotypes/*.* |
| 12 |
echo "PLEASE UPDATE DIAGRAMS IN ${SOURCE}/2_feature_gallery_export/ MANUALLY" &&\ |
| 13 |
echo "PLEASE UPDATE DIAGRAMS IN ${SOURCE}/5_modeling_hints_export/ MANUALLY" &&\ |
| 14 |
xmlto --stringparam html.stylesheet=html.css -o ./html/ xhtml-nochunks ${SOURCE}/crystal-facet-uml_documentation.xml &&\ |
| 15 |
echo relocate image files &&\ |
| 16 |
cat ${SOURCE}/*.xml | grep -e 'fileref.*png' | sed -e 's#^[^"]*"\([^"]*\)".*#${SOURCE}/\1#' | xargs cp --target-directory=./html &&\ |
| 17 |
cat ${SOURCE}/*.xml | grep -e 'fileref.*svg' | sed -e 's#^[^"]*"\([^"]*\)".*#${SOURCE}/\1#' | xargs cp --target-directory=./html &&\ |
| 18 |
cp ${SOURCE}/html.css ./html &&\ |
| 19 |
cp ${SOURCE}/4_stereotypes/*.svg ./html &&\ |
| 20 |
find ./html -name '*.html' | xargs sed -i -e 's/\.\.\/\.\.\/gui\/source\/resources\///g' &&\ |
| 21 |
find ./html -name '*.html' | xargs sed -i -e 's/2_feature_gallery_export\///g' |
| 22 |
find ./html -name '*.html' | xargs sed -i -e 's/5_modeling_hints_export\///g' |
| 23 |
mv ./html/crystal-facet-uml_documentation.html ./html/index.html |
| 24 |
|
| 25 |
MAN_STYLESHEET_ROOT=`find /usr/share/xml/docbook/stylesheet -name manpages` |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
MANPAGE_FILE="crystal-facet-uml.1" |
| 30 |
|
| 31 |
crystal-facet-uml.1.gz: ${SOURCE}/manpage.xml ${SOURCE}/1_non_tech_intro_para.xml ${SOURCE}/6_command_line_example_para.xml |
| 32 |
rm -f ${MANPAGE_FILE}.gz ${MAPGAPE_FILE}i &&\ |
| 33 |
if [ -e "${MAN_STYLESHEET_ROOT}/docbook.xsl" ] ; then\ |
| 34 |
echo "using ${MAN_STYLESHEET_ROOT}/docbook.xsl ...\n" &&\ |
| 35 |
xsltproc --nonet --param man.charmap.use.subset "0" --xinclude "${MAN_STYLESHEET_ROOT}/docbook.xsl" ${SOURCE}/manpage.xml &&\ |
| 36 |
gzip --quiet ${MANPAGE_FILE} ;\ |
| 37 |
else \ |
| 38 |
echo "ERROR: find an appropriate xsl file for the manapge at /usr/share/xml/docbook/stylesheet" ;\ |
| 39 |
fi &&\ |
| 40 |
echo "to view the output, gunzip --keep ${MANPAGE_FILE}.gz && man --local-file ${MANPAGE_FILE}" |
| 41 |
|
| 42 |
.PHONY: info |
| 43 |
info: |
| 44 |
@printf "== call \\e[33;1m make install \\e[0m to update the files in folder ../../installation ==\n" |
| 45 |
|
| 46 |
.PHONY: clean |
| 47 |
clean: |
| 48 |
rm -f crystal-facet-uml_documentation.pdf &&\ |
| 49 |
rm -fr html &&\ |
| 50 |
rm -f ${MANPAGE_FILE}.gz |
| 51 |
|
| 52 |
.PHONY: install |
| 53 |
install: crystal-facet-uml_documentation.pdf crystal-facet-uml.1.gz |
| 54 |
cp crystal-facet-uml_documentation.pdf ../../installation/ &&\ |
| 55 |
cp ${MANPAGE_FILE}.gz ../../installation/linux/ |
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|