summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2013-04-15 20:46:22 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2013-04-15 20:46:22 +0200
commitbb010817ab49b8b80daba4ddc9e3a0ef0cb21491 (patch)
treea61d3bd95d1963ead1906cd0397fc89d81239672
parent494ac0bd090df5f33f2e62fe41ecd58ed9422461 (diff)
downloadnetctl-bb010817ab49b8b80daba4ddc9e3a0ef0cb21491.tar.gz
netctl-bb010817ab49b8b80daba4ddc9e3a0ef0cb21491.tar.xz
Don't rebuild the manpages on install
Only (forcefully) rebuild them when generating a source tarball. This is an addendum to 9b500.
-rw-r--r--Makefile18
-rw-r--r--docs/Makefile6
2 files changed, 11 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index b2ac7d8..40aa2de 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,10 @@
export VERSION = 0.8
-.PHONY: install install-docs docs tarball pkgbuild clean
+.PHONY: install tarball pkgbuild clean
-install: install-docs
+install:
+ # Documentation
+ $(MAKE) -C docs install
# Configuration files
install -d $(DESTDIR)/etc/netctl/{examples,hooks,interfaces}
install -m644 docs/examples/* $(DESTDIR)/etc/netctl/examples/
@@ -23,17 +25,9 @@ install: install-docs
install -d $(DESTDIR)/usr/lib/systemd/system
install -m644 services/*.service $(DESTDIR)/usr/lib/systemd/system/
-install-docs: docs
- install -d $(DESTDIR)/usr/share/man/{man1,man5,man7}
- install -m644 docs/*.1 $(DESTDIR)/usr/share/man/man1/
- install -m644 docs/*.5 $(DESTDIR)/usr/share/man/man5/
- install -m644 docs/*.7 $(DESTDIR)/usr/share/man/man7/
-
-docs:
- $(MAKE) -B -C $@
-
tarball: netctl-$(VERSION).tar.xz
-netctl-$(VERSION).tar.xz: | docs
+netctl-$(VERSION).tar.xz:
+ $(MAKE) -B -C docs
cp src/netctl{,.orig}
sed -i "s/NETCTL_VERSION=.*/NETCTL_VERSION=$(VERSION)/" src/netctl
git stash save -q
diff --git a/docs/Makefile b/docs/Makefile
index 879e5ac..2fd858b 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -2,11 +2,15 @@
MANPAGES = netctl.1 netctl.profile.5 netctl.special.7
-.PHONY: manpages clean
+.PHONY: manpages install $(MANPAGES:=-install) clean
manpages: $(MANPAGES)
$(MANPAGES): %: %.txt
a2x -d manpage -f manpage -a manversion=$(VERSION) $<
+install: $(MANPAGES:=-install)
+$(MANPAGES:=-install): %-install: %
+ install -Dm644 $< $(DESTDIR)/usr/share/man/man$(subst .,,$(suffix $<))/$<
+
clean:
-@rm -vf $(MANPAGES) 2>/dev/null