1 ## Process this file with automake to produce Makefile.in
3 SUBDIRS = build @MANLANGDIRS@
4 DIST_SUBDIRS = build cs ru sk
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 $@" ;
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
63 $(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
64 --program "$(top_builddir)/src/wmaker" --man-page "wmaker.1"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
111 $(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
112 --program "$(top_builddir)/util/wmsetbg" --man-page "wmsetbg.1"
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"
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 ################################################################################
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=""; \
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)' \
144 generated_pages="$$generated_pages $$man"; \
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 }' $< > $@