Coverity: fix rootmenu structurally dead code
[wmaker-crm.git] / doc / Makefile.am
blobbdb07ed12ec7b3f857903218cfc0f72c58c5752c
1 ## Process this file with automake to produce Makefile.in
3 SUBDIRS = build @MANLANGDIRS@
4 DIST_SUBDIRS = build cs ru sk
6 dist_man_MANS = \
7         geticonset.1 \
8         getstyle.1 \
9         seticons.1 \
10         setstyle.1 \
11         wdread.1 \
12         wdwrite.1 \
13         WindowMaker.1 \
14         wmagnify.1 \
15         wmgenmenu.1 \
16         wmiv.1 \
17         wmmenugen.1 \
18         WPrefs.1 \
19         wxcopy.1 \
20         wxpaste.1
22 man_MANS = \
23         wmaker.1 \
24         wmsetbg.1
26 MOSTLYCLEANFILES = wmaker.1 wmsetbg.1
28 EXTRA_DIST = wmaker.in wmsetbg.in
31 ################################################################################
32 # Generation of man pages that need processing
33 ################################################################################
35 wmaker.1: wmaker.in Makefile $(top_builddir)/config.h
36         $(AM_V_GEN)$(top_srcdir)/script/replace-ac-keywords.sh \
37                 --header "$(top_builddir)/config.h" --filter "HAVE_INOTIFY" \
38                 --filter "USE_ICCCM_WMREPLACE" \
39                 -D"pkgdatadir=$(pkgdatadir)" --replace "pkgdatadir" \
40                 -D"pkgconfdir=$(pkgconfdir)" --replace "pkgconfdir" \
41                 -o "wmaker.1"  "$(srcdir)/wmaker.in"
43 wmsetbg.1: wmsetbg.in Makefile $(top_builddir)/config.h
44         $(AM_V_GEN)$(top_srcdir)/script/replace-ac-keywords.sh \
45                 --header "$(top_builddir)/config.h" --filter "USE_XINERAMA" \
46                 -o "wmsetbg.1"  "$(srcdir)/wmsetbg.in"
49 ################################################################################
50 # Section for checking the man pages against the program's --help text
51 ################################################################################
53 # Create a 'silent rule' for our make check the same way automake does
54 AM_V_CHKOPTS = $(am__v_CHKOPTS_$(V))
55 am__v_CHKOPTS_  = $(am__v_CHKOPTS_$(AM_DEFAULT_VERBOSITY))
56 am__v_CHKOPTS_0 = @echo "  CHK      $@" ;
57 am__v_CHKOPTS_1 =
59 check-local: wmaker-args WPrefs-args wmagnify-args geticonset-args getstyle-args seticons-args setstyle-args \
60         wdread-args wdwrite-args wmgenmenu-args wmiv-args wmmenugen-args wmsetbg-args wxcopy-args wxpaste-args
62 wmaker-args:
63         $(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
64                 --program "$(top_builddir)/src/wmaker" --man-page "wmaker.1"
66 WPrefs-args:
67         $(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
68                 --program "$(top_builddir)/WPrefs.app/WPrefs" --man-page "$(top_srcdir)/doc/WPrefs.1"
70 wmagnify-args:
71         $(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
72                 --program "$(top_builddir)/util/wmagnify" --man-page "$(top_srcdir)/doc/wmagnify.1"
74 geticonset-args:
75         $(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
76                 --program "$(top_builddir)/util/geticonset" --man-page "$(top_srcdir)/doc/geticonset.1"
78 getstyle-args:
79         $(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
80                 --program "$(top_builddir)/util/getstyle" --man-page "$(top_srcdir)/doc/getstyle.1"
82 seticons-args:
83         $(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
84                 --program "$(top_builddir)/util/seticons" --man-page "$(top_srcdir)/doc/seticons.1"
86 setstyle-args:
87         $(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
88                 --program "$(top_builddir)/util/setstyle" --man-page "$(top_srcdir)/doc/setstyle.1"
90 wdread-args:
91         $(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
92                 --program "$(top_builddir)/util/wdread" --man-page "$(top_srcdir)/doc/wdread.1"
94 wdwrite-args:
95         $(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
96                 --program "$(top_builddir)/util/wdwrite" --man-page "$(top_srcdir)/doc/wdwrite.1"
98 wmgenmenu-args:
99         $(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
100                 --program "$(top_builddir)/util/wmgenmenu" --man-page "$(top_srcdir)/doc/wmgenmenu.1"
102 wmiv-args:
103         $(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
104                 --program "$(top_builddir)/util/wmiv" --man-page "$(top_srcdir)/doc/wmiv.1"
106 wmmenugen-args:
107         $(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
108                 --program "$(top_builddir)/util/wmmenugen" --man-page "$(top_srcdir)/doc/wmmenugen.1"
110 wmsetbg-args:
111         $(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
112                 --program "$(top_builddir)/util/wmsetbg" --man-page "wmsetbg.1"
114 wxcopy-args:
115         $(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
116                 --program "$(top_builddir)/util/wxcopy" --man-page "$(top_srcdir)/doc/wxcopy.1"
118 wxpaste-args:
119         $(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
120                 --program "$(top_builddir)/util/wxpaste" --man-page "$(top_srcdir)/doc/wxpaste.1"
122 .PHONY: wmaker-args WPrefs-args wmagnify-args geticonset-args getstyle-args seticons-args setstyle-args \
123         wdread-args wdwrite-args wmgenmenu-args wmiv-args wmmenugen-args wmsetbg-args wxcopy-args wxpaste-args
126 ################################################################################
127 # Section related to generating HTML version of man pages for the website
128 ################################################################################
130 if WITH_WEB_REPO
131 # We convert all man pages except those that are a link to other man page (.so command)
132 website: $(MANS) website.menu
133         @local_pages=`echo "$^" | sed -e 's/ [^ ]*\.menu$$// ; s,[^ /]*/,,g' `; \
134         generated_pages=""; \
135         for man in $^; do \
136           [ "$$man" = "website.menu" ] && continue; \
137           grep -i '^\.so[ \t]' "$$man" > /dev/null && continue; \
138           echo "  MAN2HTML $$man"; \
139           $(top_srcdir)/script/generate-html-from-man.sh --groff $(GROFF) \
140                 --output $(WEB_REPO_ROOT)/docs/manpages/`echo "$$man" | sed -e 's,[^ /]*/,,g ; s/\.[^.]*$$//' `.html \
141                 --local-pages "$$local_pages"  --external-url 'http://linux.die.net/man/%s/%l' \
142                 --with-menu "website.menu"  --package '$(PACKAGE_STRING)' \
143                 $$man || exit $$?; \
144           generated_pages="$$generated_pages $$man"; \
145         done; \
146         echo "  UPDATE   index.md"; \
147         $(top_srcdir)/script/replace-generated-content.sh  --man-pages "$$generated_pages" \
148                 --template '<tr><td class="name"><a href="\1">\2</a></td><td class="section">\3</td><td>\4</td></tr>' \
149                 --marker LIST_MANPAGES_COMMANDS  $(WEB_REPO_ROOT)/docs/manpages/index.md
151 MOSTLYCLEANFILES += website.menu
153 # This menu is the icon bar to navigate on the website, which we want to keep on all man pages
154 # We extract it from the Template defined for all pages of the site
155 website.menu: $(WEB_REPO_ROOT)/_layouts/default.html
156         $(AM_V_GEN)sed -n -e '/<aside>/,/<\/aside>/ { s/{{ site.baseurl }}// ; s/^    // ; p }'  $<  >  $@
157 endif
159 .PHONY: website