]> pd.if.org Git - zpackage/blobdiff - Makefile
add man pages
[zpackage] / Makefile
index 1a4b2b6bcc647703e862d4a6fb65ba3fbb288256..13b3d2b6188023aeb6e3fd559bdc24e8bb471d62 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -34,6 +34,7 @@ ZPKGBIN=zpm-addfile zpm-extract zpm-init zpm-vercmp zpm-stat zpm-hash \
 SCRIPTS=zpm zpm-install zpm-merge zpm-list zpm-preserve zpm-test zpm-log \
        zpm-contents zpm-uninstall zpm-pathmod zpm-rmpackage zpm-newpackage \
        zpm-pkg zpm-add zpm-pkgfile zpm-gc zpm-repo zpm-update zpm-confgit
+MANPAGES=$(addprefix doc/, zpm.8 zpm-list.8 zpm-contents.8)
 COMPILED=$(ZPKGBIN)
 PROGRAMS=$(SCRIPTS) $(COMPILED)
 
@@ -72,11 +73,11 @@ lib/libjsw.a: $(JSWOBJ)
 
 ZPM:= ./zpm -P.
 
-zpm-$(ZPMVER)-1.zpm: programs doc/zpm.8
+zpm-$(ZPMVER)-1.zpm: programs $(MANPAGES)
        rm -f $@
        $(ZPM) newpackage -C zpm-$(ZPMVER)-1
        $(ZPM) add -v -u root -g root -f $@ -P /sbin zpm-$(ZPMVER)-1 $(sort $(PROGRAMS))
-       $(ZPM) add -v -u root -g root -f $@ -P /usr/share/man/man8 -S doc doc/zpm.8
+       $(ZPM) add -v -u root -g root -f $@ -P /usr/share/man/man8 -S doc $(MANPAGES)
 
 tarball: zpm-$(ZPMVER)-1.tar.xz
 
@@ -192,11 +193,11 @@ zpm-shell: sqlite/sqlite3.o sqlite/shell.o sqlite/extensions.o lib/vercmp.o
 libelf.a: elf/libelf.o
        ar rcuv $@ $?
 
-install: $(COMPILED) doc/zpm.8
+install: $(COMPILED) $(MANPAGES)
        test -d $(DESTDIR)/sbin || install -d $(DESTDIR)/sbin
        install $(PROGRAMS) $(DESTDIR)/sbin
        mkdir -p $(DESTDIR)/usr/share/man/man8
-       install -m644 doc/zpm.8 $(DESTDIR)/usr/share/man/man8
+       install -m644 $(MANPAGES) $(DESTDIR)/usr/share/man/man8
 
 scan-prep: clean sqlite/sqlite3.o sqlite/shell.o lib/liblzma.a
        @echo scan-build -v -o report make -j10