2 ## Ion manual page Makefile
5 # System-specific configuration is in system.mk
7 include $(TOPDIR)/build/system-inc.mk
9 ######################################
15 $(foreach tr, $(TRANSLATIONS), welcome.$(tr).txt)
17 TARGETS=ion3.1 $(foreach tr, $(TRANSLATIONS), ion3.$(tr).1) \
18 pwm3.1 $(foreach tr, $(TRANSLATIONS), pwm3.$(tr).1) \
21 MKMAN=$(LUA) ../build/mkman.lua
22 NROFF=nroff -man -Tlatin1
23 #FILTERCRAP=perl -p -i -e 's/.\10//g'
24 FILTERCRAP=$(LUA) -e 'io.write((string.gsub(io.read("*a"), ".\8", "")))'
26 CONFIGS=../etc/cfg_ioncore.lua \
27 ../etc/cfg_tiling.lua \
28 ../etc/cfg_query.lua \
31 # TODO: PWM configuration file is undocumented
33 ../etc/cfg_ioncore.lua \
36 ######################################
38 include $(TOPDIR)/build/rules.mk
40 ######################################
42 ion3.1: ion3.in $(CONFIGS)
43 $(MKMAN) -i $< -o $@ -D ETCDIR $(ETCDIR) -D DOCDIR $(DOCDIR) $(CONFIGS)
45 pwm3.1: pwm3.in $(PWM_CONFIGS)
46 $(MKMAN) -i $< -o $@ -D ETCDIR $(ETCDIR) -D DOCDIR $(DOCDIR) $(PWM_CONFIGS)
48 ion3.%.1: ion3.%.in $(CONFIGS) ../po/%.po
49 $(MKMAN) -po ../po/$*.po -i $< -o $@ -D ETCDIR $(ETCDIR) -D DOCDIR $(DOCDIR) $(CONFIGS)
51 pwm3.%.1: pwm3.%.in $(PWM_CONFIGS) ../po/%.po
52 $(MKMAN) -po ../po/$*.po -i $< -o $@ -D ETCDIR $(ETCDIR) -D DOCDIR $(DOCDIR) $(PWM_CONFIGS)
54 welcome%txt: welcome%head ion3%1
56 $(NROFF) ion3$*1 | $(FILTERCRAP)) > $@
59 $(INSTALLDIR) $(MANDIR)/man1
60 $(INSTALL) -m $(DATA_MODE) ion3.1 $(MANDIR)/man1
61 $(INSTALL) -m $(DATA_MODE) pwm3.1 $(MANDIR)/man1
62 for tr in $(TRANSLATIONS); do \
63 $(INSTALLDIR) $(MANDIR)/$$tr/man1 ; \
64 $(INSTALL) -m $(DATA_MODE) ion3.$$tr.1 $(MANDIR)/$$tr/man1/ion3.1 ; \
65 $(INSTALL) -m $(DATA_MODE) pwm3.$$tr.1 $(MANDIR)/$$tr/man1/pwm3.1 ; \
67 $(INSTALLDIR) $(SHAREDIR)
68 for i in $(WELCOME_TARGETS); do \
69 $(INSTALL) -m $(DATA_MODE) $$i $(SHAREDIR) ; \