mirror of
https://github.com/shadow-maint/shadow.git
synced 2024-12-04 23:43:31 +08:00
6c6c8d3a33
This patch was taken from Fedora Rawhide
b41cff1956/f/shadow-4.6-use-itstool.patch
31 lines
888 B
Makefile
31 lines
888 B
Makefile
LANG=$(notdir $(CURDIR))
|
|
|
|
if ENABLE_REGENERATE_MAN
|
|
config.xml: ../config.xml.in
|
|
$(MAKE) -C .. config.xml
|
|
cp ../config.xml $@
|
|
|
|
messages.mo: ../po/$(LANG).po
|
|
msgfmt ../po/$(LANG).po -o messages.mo
|
|
|
|
login.defs.d:
|
|
ln -sf ../login.defs.d login.defs.d
|
|
|
|
%.xml: ../%.xml messages.mo login.defs.d
|
|
if grep -q SHADOW-CONFIG-HERE $< ; then \
|
|
sed -e 's/^<!-- SHADOW-CONFIG-HERE -->/<!ENTITY % config SYSTEM "config.xml">%config;/' $< > $@; \
|
|
else \
|
|
sed -e 's/^\(<!DOCTYPE .*docbookx.dtd"\)>/\1 [<!ENTITY % config SYSTEM "config.xml">%config;]>/' $< > $@; \
|
|
fi
|
|
itstool -d -l $(LANG) -m messages.mo -o . $@
|
|
sed -i 's:\(^<refentry .*\)>:\1 lang="$(LANG)">:' $@
|
|
|
|
include ../generate_mans.mak
|
|
|
|
else
|
|
$(man_MANS):
|
|
@echo you need to run configure with --enable-man to generate man pages
|
|
endif
|
|
|
|
CLEANFILES = messages.mo login.defs.d $(EXTRA_DIST) $(addsuffix .xml,$(EXTRA_DIST)) config.xml
|