Commit 25258ff8 authored by Jari Aalto's avatar Jari Aalto

debian/debian-autotools.mk: update

parent 6a4e6b1b
# debian-autotools.mk -- Common settings for Autotoolsx
#!/usr/bin/make -f
#
# debian-autotools.mk -- Common settings for Autotoolsx
#
# Copyright
#
# Copyright (C) 2008-2009 Jari Aalto <jari.aalto@cante.net>
# Copyright (C) 2008-2010 Jari Aalto <jari.aalto@cante.net>
#
# License
#
......@@ -21,7 +23,7 @@
#
# Description
#
# This is GNU makefile part, that defines common variables,
# This is GNU makefile part that defines common variables,
# targets and macros to be used from debian/rules.
#
# Dealing with packages that have old Autotools config.* files
......@@ -29,24 +31,12 @@
# Debian (3) restore package's config.* files. This way the
# DEbian *diff.gz stays clean and understandable to examine.
#
# To install, add `config-*' macro calls like this:
#
#
# [new debhelper]
#
# override_dh_auto_configure:
# $(make-depend-save)
# $(config-save)
# $(config-patch)
# CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr
#
# [older debhelper]
# To install, add macro calls like this:
#
# config.status: configure
# dh_testdir
# $(make-depend-save)
# $(config-save)
# $(config-patch)
# $(config-prepare)
# CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
#
# binary-arch: build install
......@@ -86,43 +76,47 @@ endef
# ........................................................ configure ...
define config-configure-save
# config-configure-save: Save original file
# Save original file
[ -f configure.original ] || cp -v configure configure.original
endef
define config-configure-restore
# config-configure-restore: Restore original file
# Restore original file
[ ! -f configure.original ] || mv -v configure.original configure
endef
# ........................................ Debian config.{sub,guess} ...
define config-patch-sub
# config-patch-sub: Use latest version from Debian
[ ! -f /usr/share/misc/config.sub ] || cp -vf /usr/share/misc/config.sub config.sub
# Use latest version from Debian
ifneq ($(wildcard /usr/share/misc/config.sub),)
cp -vf /usr/share/misc/config.sub config.sub
endif
endef
define config-patch-guess
# config-patch-guess: Use latest version from Debian
[ ! -f /usr/share/misc/config.guess ] || cp -vf /usr/share/misc/config.guess config.guess
# Use latest version from Debian
ifneq ($(wildcard /usr/share/misc/config.guess),)
cp -vf /usr/share/misc/config.guess config.guess
endif
endef
# ............................................... config.{sub,guess} ...
define config-save
# config-save: Save original files
# Save original files
[ -f config.sub.original ] || cp -v config.sub config.sub.original
[ -f config.guess.original ] || cp -v config.guess config.guess.original
endef
define config-restore
# config-restore: Restore original files
# Restore original files
[ ! -f config.sub.original ] || mv -v config.sub.original config.sub
[ ! -f config.guess.original ] || mv -v config.guess.original config.guess
endef
define config-delete
# config-delete: Delete config files
# Delete config files
rm -f config.sub config.guess
endef
......@@ -132,4 +126,9 @@ define config-patch
$(config-patch-guess)
endef
define config-prepare
$(config-save)
$(config-patch)
endef
# End of Makefile part
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment