Import libtu instead of using submodules
[notion/jeffpc.git] / man / Makefile
blob3da6074c995fefd12299957ac4649d5cddb35cf1
1 ##
2 ## Notion manual page Makefile
3 ##
5 # System-specific configuration is in system.mk
6 TOPDIR=..
7 include $(TOPDIR)/build/system-inc.mk
9 ######################################
11 TRANSLATIONS=fi cs
13 WELCOME_TARGETS=\
14 welcome.txt \
15 $(foreach tr, $(TRANSLATIONS), welcome.$(tr).txt)
17 TARGETS=notion.1 notionflux.1 $(foreach tr, $(TRANSLATIONS), notion.$(tr).1) \
18 $(WELCOME_TARGETS)
20 MKMAN=$(LUA) ../build/mkman.lua $(MKMAN_DEFS)
21 MKMAN_DEFS=-D ETCDIR $(REL)$(ETCDIR) -D DOCDIR $(REL)$(DOCDIR)
23 ifeq ($(RELOCATABLE),1)
24 REL="/..."
25 endif
27 NROFF=nroff -man -Tlatin1
28 #FILTERCRAP=perl -p -i -e 's/.\10//g'
29 FILTERCRAP=$(LUA) -e 'io.write((string.gsub(io.read("*a"), ".\8", "")))'
31 CONFIGS=../etc/cfg_notioncore.lua \
32 ../etc/cfg_tiling.lua \
33 ../etc/cfg_query.lua \
34 ../etc/cfg_menu.lua
36 ######################################
38 include $(TOPDIR)/build/rules.mk
40 ######################################
42 notion.1: notion.in $(CONFIGS)
43 $(MKMAN) -i $< -o $@ $(CONFIGS)
45 notion.%.1: notion.%.in $(CONFIGS) ../po/%.po
46 $(MKMAN) -po ../po/$*.po -i $< -o $@ $(CONFIGS)
48 notionflux.1: notionflux.in $(CONFIGS)
49 $(MKMAN) -i $< -o $@ $(CONFIGS)
51 welcome%txt: welcome%head notion%1
52 (cat welcome$*head; \
53 $(NROFF) notion$*1 | $(FILTERCRAP)) > $@
55 _install:
56 $(INSTALLDIR) $(DESTDIR)$(MANDIR)/man1
57 $(INSTALL) -m $(DATA_MODE) notion.1 $(DESTDIR)$(MANDIR)/man1
58 $(INSTALL) -m $(DATA_MODE) notionflux.1 $(DESTDIR)$(MANDIR)/man1
59 for tr in $(TRANSLATIONS); do \
60 $(INSTALLDIR) $(DESTDIR)$(MANDIR)/$$tr/man1 ; \
61 $(INSTALL) -m $(DATA_MODE) notion.$$tr.1 $(DESTDIR)$(MANDIR)/$$tr/man1/notion.1 ; \
62 done
63 $(INSTALLDIR) $(DESTDIR)$(SHAREDIR)
64 for i in $(WELCOME_TARGETS); do \
65 $(INSTALL) -m $(DATA_MODE) $$i $(DESTDIR)$(SHAREDIR) ; \
66 done