3 # Debian build rules for help2man.
5 # Copyright (C) 2012, 2014 Free Software Foundation, Inc.
7 # Copying and distribution of this file, with or without modification,
8 # are permitted in any medium without royalty provided the copyright
9 # notice and this notice are preserved. This file is offered as-is,
10 # without any warranty.
12 # Written by Brendan O'Dea <bod@debian.org>
15 DPKG_EXPORT_BUILDFLAGS = 1
17 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
19 include /usr/share/dpkg/architecture.mk
20 include /usr/share/dpkg/buildflags.mk
22 ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
23 CONFARGS = --host=$(DEB_HOST_GNU_TYPE)
26 build: build-arch build-indep
27 build-arch build-indep: build-stamp
30 dh_update_autotools_config # Update config.guess, config.sub
31 ./configure --prefix=/usr --enable-nls --mandir='$${prefix}/share/man' \
32 --infodir='$${prefix}/share/info' $(CONFARGS)
35 $(MAKE) help2man.h2m # for examples
39 test README -nt help2man.PL # maintainer sanity check
42 [ ! -f Makefile ] || $(MAKE) distclean
43 rm -f build-stamp install-stamp
46 install: install-stamp
47 install-stamp: build-stamp
52 $(MAKE) install DESTDIR=$(CURDIR)/debian/help2man
55 # Build architecture-independent files here.
56 binary-arch: build install
73 # Build architecture-dependent files here.
74 binary-indep: build install
75 # We have nothing to do by default.
78 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
80 # maintainer pre-release setup
81 AM_DOC = COPYING INSTALL
82 AM_AUX = install-sh missing mkinstalldirs
83 AM_DIR = $(shell ls -d /usr/share/automake* 2>/dev/null | tail -1)
84 VERSION = $(shell ./help2man.PL --version)
87 test `dpkg-parsechangelog --show-field=Version` = $(VERSION)
88 cp $(addprefix $(AM_DIR)/,$(AM_DOC)) .
89 cp $(addprefix $(AM_DIR)/,$(AM_AUX)) build-aux
90 (echo " README for GNU help2man version $(VERSION)"; \
92 echo "help2man is a script to create simple man pages from the --help and"; \
93 echo "--version output of programs."; \
95 echo " http://www.gnu.org/software/help2man/"; \
96 echo " ftp://ftp.gnu.org/gnu/help2man/help2man-$(VERSION).tar.xz"; \
98 echo " git://anonscm.debian.org/users/bod/help2man.git"; \
99 echo " http://anonscm.debian.org/gitweb/?p=users/bod/help2man.git"; \
101 echo "Since most GNU documentation is now in info format, this provides a"; \
102 echo "way to generate a placeholder man page pointing to that resource while"; \
103 echo "still providing some useful information."; \
106 echo "Brendan O'Dea <bod@debian.org>") >README
107 ln -sf debian/changelog ChangeLog
110 $(MAKE) update-po all distclean
112 maint-clean: maint-prep
114 $(MAKE) maintainer-clean
115 rm -f README ChangeLog $(AM_DOC) $(addprefix build-aux/,$(AM_AUX))
117 binary: binary-indep binary-arch
118 .PHONY: build clean binary-indep binary-arch binary maint-prep maint-clean