3 # Debian build rules for help2man.
6 DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
7 DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
9 ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
10 CONFARGS = --host=$(DEB_HOST_GNU_TYPE)
13 build: build-arch build-indep
14 build-arch build-indep: build-stamp
17 ./configure --prefix=/usr --enable-nls --mandir='$${prefix}/share/man' \
18 --infodir='$${prefix}/share/info' $(CONFARGS)
21 $(MAKE) help2man.h2m # for examples
25 test README -nt help2man.PL # maintainer sanity check
28 [ ! -f Makefile ] || $(MAKE) distclean
29 rm -f build-stamp install-stamp
32 install: install-stamp
33 install-stamp: build-stamp
38 $(MAKE) install DESTDIR=$(CURDIR)/debian/help2man
41 # Build architecture-independent files here.
42 binary-arch: build install
59 # Build architecture-dependent files here.
60 binary-indep: build install
61 # We have nothing to do by default.
64 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
66 # maintainer pre-release setup
67 AM = COPYING INSTALL install-sh mkinstalldirs
68 AM_DIR = $(shell ls -d /usr/share/automake* 2>/dev/null | tail -1)
69 VERSION = $(shell ./help2man.PL --version)
72 test `dpkg-parsechangelog | sed -n 's/^Version:\s\+//p'` = $(VERSION)
73 cp $(addprefix $(AM_DIR)/,$(AM)) .
74 (echo " README for GNU help2man version $(VERSION)"; \
76 echo "help2man is a script to create simple man pages from the --help and"; \
77 echo "--version output of programs."; \
79 echo " http://www.gnu.org/software/help2man/"; \
80 echo " ftp://ftp.gnu.org/gnu/help2man/help2man-$(VERSION).tar.gz"; \
82 echo " git://anonscm.debian.org/users/bod/help2man.git"; \
83 echo " http://anonscm.debian.org/git/users/bod/help2man.git"; \
85 echo "Since most GNU documentation is now in info format, this provides a"; \
86 echo "way to generate a placeholder man page pointing to that resource while"; \
87 echo "still providing some useful information."; \
90 echo "Brendan O'Dea <bod@debian.org>") >README
91 ln -sf debian/changelog ChangeLog
94 $(MAKE) update-po all distclean
96 maint-clean: maint-prep
98 $(MAKE) maintainer-clean
99 rm -f README ChangeLog $(AM)
101 binary: binary-indep binary-arch
102 .PHONY: build clean binary-indep binary-arch binary maint-prep maint-clean