mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Subject: Move make targets from docs/ to common/Make.rules
This patch moves the make rules used to generate man pages and their html counterparts from the docs package to the common/ directory, so that all packages can make use of them. It also makes the immunix.css stylesheet available via the common/ dir, renaming it to apparmor.css.
This commit is contained in:
parent
41bd5154e6
commit
9ef2941687
4 changed files with 70 additions and 38 deletions
|
@ -165,6 +165,75 @@ build_dir: $(BUILDRPMSUBDIRS)
|
||||||
$(BUILDRPMSUBDIRS):
|
$(BUILDRPMSUBDIRS):
|
||||||
mkdir -p $(BUILDRPMSUBDIRS)
|
mkdir -p $(BUILDRPMSUBDIRS)
|
||||||
|
|
||||||
|
# =====================
|
||||||
|
# manpages
|
||||||
|
# =====================
|
||||||
|
|
||||||
|
POD2MAN = /usr/bin/pod2man
|
||||||
|
POD2HTML = /usr/bin/pod2html
|
||||||
|
MANDIR = /usr/share/man
|
||||||
|
DOCDIR = /usr/share/doc/${NAME}-${VERSION}
|
||||||
|
|
||||||
|
# get list of directory numbers based on definition of MANPAGES variable
|
||||||
|
MANDIRS=$(sort $(foreach dir, 1 2 3 4 5 6 7 8, $(patsubst %.${dir}, ${dir}, $(filter %.${dir}, ${MANPAGES}))))
|
||||||
|
HTMLMANPAGES=$(foreach manpage, ${MANPAGES}, ${manpage}.html)
|
||||||
|
|
||||||
|
.PHONY: install_manpages
|
||||||
|
install_manpages: $(MANPAGES)
|
||||||
|
$(foreach dir, ${MANDIRS}, \
|
||||||
|
install -d ${DESTDIR}/${MANDIR}/man${dir} ; \
|
||||||
|
install -m 644 $(filter %.${dir}, ${MANPAGES}) ${DESTDIR}/${MANDIR}/man${dir}; \
|
||||||
|
$(foreach aa_page, $(filter %.${dir}, ${AA_MANPAGES}), \
|
||||||
|
ln -sf $(aa_page) ${DESTDIR}/${MANDIR}/man${dir}/${aa_page:%=aa-%};))
|
||||||
|
|
||||||
|
%.1: %.pod
|
||||||
|
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=1 > $@
|
||||||
|
|
||||||
|
%.2: %.pod
|
||||||
|
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=2 > $@
|
||||||
|
|
||||||
|
%.3: %.pod
|
||||||
|
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=3 > $@
|
||||||
|
|
||||||
|
%.4: %.pod
|
||||||
|
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=4 > $@
|
||||||
|
|
||||||
|
%.5: %.pod
|
||||||
|
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=5 > $@
|
||||||
|
|
||||||
|
%.6: %.pod
|
||||||
|
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=6 > $@
|
||||||
|
|
||||||
|
%.7: %.pod
|
||||||
|
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=7 > $@
|
||||||
|
|
||||||
|
%.8: %.pod
|
||||||
|
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=8 > $@
|
||||||
|
|
||||||
|
%.1.html: %.pod
|
||||||
|
$(POD2HTML) --header --css apparmor.css --infile=$< --outfile=$@
|
||||||
|
|
||||||
|
%.2.html: %.pod
|
||||||
|
$(POD2HTML) --header --css apparmor.css --infile=$< --outfile=$@
|
||||||
|
|
||||||
|
%.3.html: %.pod
|
||||||
|
$(POD2HTML) --header --css apparmor.css --infile=$< --outfile=$@
|
||||||
|
|
||||||
|
%.4.html: %.pod
|
||||||
|
$(POD2HTML) --header --css apparmor.css --infile=$< --outfile=$@
|
||||||
|
|
||||||
|
%.5.html: %.pod
|
||||||
|
$(POD2HTML) --header --css apparmor.css --infile=$< --outfile=$@
|
||||||
|
|
||||||
|
%.6.html: %.pod
|
||||||
|
$(POD2HTML) --header --css apparmor.css --infile=$< --outfile=$@
|
||||||
|
|
||||||
|
%.7.html: %.pod
|
||||||
|
$(POD2HTML) --header --css apparmor.css --infile=$< --outfile=$@
|
||||||
|
|
||||||
|
%.8.html: %.pod
|
||||||
|
$(POD2HTML) --header --css apparmor.css --infile=$< --outfile=$@
|
||||||
|
|
||||||
# =====================
|
# =====================
|
||||||
# Slackware poo
|
# Slackware poo
|
||||||
# =====================
|
# =====================
|
||||||
|
|
|
@ -33,11 +33,7 @@ common/Make.rules: ${COMMONDIR}/Make.rules
|
||||||
ln -sf ${COMMONDIR} .
|
ln -sf ${COMMONDIR} .
|
||||||
endif
|
endif
|
||||||
|
|
||||||
POD2MAN = /usr/bin/pod2man
|
|
||||||
POD2HTML = /usr/bin/pod2html
|
|
||||||
RELEASE_DIR = ${NAME}-${VERSION}
|
RELEASE_DIR = ${NAME}-${VERSION}
|
||||||
MANDIRS = 2 5 7 8
|
|
||||||
MANDIR = /usr/share/man
|
|
||||||
DOCDIR = /usr/share/doc/${NAME}-${VERSION}
|
DOCDIR = /usr/share/doc/${NAME}-${VERSION}
|
||||||
|
|
||||||
AA_MANPAGES = autodep.8 complain.8 enforce.8 logprof.8 genprof.8 \
|
AA_MANPAGES = autodep.8 complain.8 enforce.8 logprof.8 genprof.8 \
|
||||||
|
@ -67,39 +63,6 @@ release: $(TARBALL)
|
||||||
clean:
|
clean:
|
||||||
-rm -f $(GENERATED) $(TARBALL) $(NAME)-$(VERSION)*.tar.gz Make.rules pod2*.tmp
|
-rm -f $(GENERATED) $(TARBALL) $(NAME)-$(VERSION)*.tar.gz Make.rules pod2*.tmp
|
||||||
|
|
||||||
# I'm pretty sure the following could be in a foreach loop, but I'm too
|
|
||||||
# lazy to code it up.
|
|
||||||
|
|
||||||
%.1: %.pod
|
|
||||||
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=1 > $@
|
|
||||||
|
|
||||||
%.2: %.pod
|
|
||||||
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=2 > $@
|
|
||||||
|
|
||||||
%.5: %.pod
|
|
||||||
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=5 > $@
|
|
||||||
|
|
||||||
%.7: %.pod
|
|
||||||
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=7 > $@
|
|
||||||
|
|
||||||
%.8: %.pod
|
|
||||||
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=8 > $@
|
|
||||||
|
|
||||||
%.1.html: %.pod
|
|
||||||
$(POD2HTML) --header --css immunix.css --infile=$< --outfile=$@
|
|
||||||
|
|
||||||
%.2.html: %.pod
|
|
||||||
$(POD2HTML) --header --css immunix.css --infile=$< --outfile=$@
|
|
||||||
|
|
||||||
%.5.html: %.pod
|
|
||||||
$(POD2HTML) --header --css immunix.css --infile=$< --outfile=$@
|
|
||||||
|
|
||||||
%.7.html: %.pod
|
|
||||||
$(POD2HTML) --header --css immunix.css --infile=$< --outfile=$@
|
|
||||||
|
|
||||||
%.8.html: %.pod
|
|
||||||
$(POD2HTML) --header --css immunix.css --infile=$< --outfile=$@
|
|
||||||
|
|
||||||
.PHONY: install_manpages
|
.PHONY: install_manpages
|
||||||
install_manpages: $(MANPAGES)
|
install_manpages: $(MANPAGES)
|
||||||
for dir in ${MANDIRS} ; do install -d ${DESTDIR}/${MANDIR}/man$${dir} ; done
|
for dir in ${MANDIRS} ; do install -d ${DESTDIR}/${MANDIR}/man$${dir} ; done
|
||||||
|
|
|
@ -64,7 +64,7 @@ make install_manpages DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir}
|
||||||
%{_mandir}/man8/*
|
%{_mandir}/man8/*
|
||||||
# html versions of the manpages
|
# html versions of the manpages
|
||||||
%doc *.[0-9].*html
|
%doc *.[0-9].*html
|
||||||
%doc immunix.css
|
%doc common/apparmor.css
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Apr 11 2006 Steve Beattie <sbeattie@use.de>
|
* Tue Apr 11 2006 Steve Beattie <sbeattie@use.de>
|
||||||
|
|
Loading…
Add table
Reference in a new issue