2 ## Notion 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
=notion
.1 notionflux
.1 $(foreach tr
, $(TRANSLATIONS
), notion.
$(tr
).1) \
20 MKMAN
=$(LUA
) ..
/build
/mkman.lua
$(MKMAN_DEFS
)
21 MKMAN_DEFS
=-D ETCDIR
$(REL
)$(ETCDIR
) -D DOCDIR
$(REL
)$(DOCDIR
)
23 ifeq ($(RELOCATABLE
),1)
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 \
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
53 $(NROFF
) notion
$*1 |
$(FILTERCRAP
)) > $@
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 ; \
63 $(INSTALLDIR
) $(DESTDIR
)$(SHAREDIR
)
64 for i in
$(WELCOME_TARGETS
); do \
65 $(INSTALL
) -m
$(DATA_MODE
) $$i $(DESTDIR
)$(SHAREDIR
) ; \