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
# #
# Copyright (C) 2008-2009 Jari Aalto <jari.aalto@cante.net> # Copyright (C) 2008-2010 Jari Aalto <jari.aalto@cante.net>
# #
# License # License
# #
...@@ -21,7 +23,7 @@ ...@@ -21,7 +23,7 @@
# #
# Description # 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. # targets and macros to be used from debian/rules.
# #
# Dealing with packages that have old Autotools config.* files # Dealing with packages that have old Autotools config.* files
...@@ -29,24 +31,12 @@ ...@@ -29,24 +31,12 @@
# Debian (3) restore package's config.* files. This way the # Debian (3) restore package's config.* files. This way the
# DEbian *diff.gz stays clean and understandable to examine. # DEbian *diff.gz stays clean and understandable to examine.
# #
# To install, add `config-*' macro calls like this: # To install, add 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]
# #
# config.status: configure # config.status: configure
# dh_testdir # dh_testdir
# $(make-depend-save) # $(make-depend-save)
# $(config-save) # $(config-prepare)
# $(config-patch)
# CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info # 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 # binary-arch: build install
...@@ -86,43 +76,47 @@ endef ...@@ -86,43 +76,47 @@ endef
# ........................................................ configure ... # ........................................................ configure ...
define config-configure-save define config-configure-save
# config-configure-save: Save original file # Save original file
[ -f configure.original ] || cp -v configure configure.original [ -f configure.original ] || cp -v configure configure.original
endef endef
define config-configure-restore define config-configure-restore
# config-configure-restore: Restore original file # Restore original file
[ ! -f configure.original ] || mv -v configure.original configure [ ! -f configure.original ] || mv -v configure.original configure
endef endef
# ........................................ Debian config.{sub,guess} ... # ........................................ Debian config.{sub,guess} ...
define config-patch-sub define config-patch-sub
# config-patch-sub: Use latest version from Debian # Use latest version from Debian
[ ! -f /usr/share/misc/config.sub ] || cp -vf /usr/share/misc/config.sub config.sub ifneq ($(wildcard /usr/share/misc/config.sub),)
cp -vf /usr/share/misc/config.sub config.sub
endif
endef endef
define config-patch-guess define config-patch-guess
# config-patch-guess: Use latest version from Debian # Use latest version from Debian
[ ! -f /usr/share/misc/config.guess ] || cp -vf /usr/share/misc/config.guess config.guess ifneq ($(wildcard /usr/share/misc/config.guess),)
cp -vf /usr/share/misc/config.guess config.guess
endif
endef endef
# ............................................... config.{sub,guess} ... # ............................................... config.{sub,guess} ...
define config-save define config-save
# config-save: Save original files # Save original files
[ -f config.sub.original ] || cp -v config.sub config.sub.original [ -f config.sub.original ] || cp -v config.sub config.sub.original
[ -f config.guess.original ] || cp -v config.guess config.guess.original [ -f config.guess.original ] || cp -v config.guess config.guess.original
endef endef
define config-restore define config-restore
# config-restore: Restore original files # Restore original files
[ ! -f config.sub.original ] || mv -v config.sub.original config.sub [ ! -f config.sub.original ] || mv -v config.sub.original config.sub
[ ! -f config.guess.original ] || mv -v config.guess.original config.guess [ ! -f config.guess.original ] || mv -v config.guess.original config.guess
endef endef
define config-delete define config-delete
# config-delete: Delete config files # Delete config files
rm -f config.sub config.guess rm -f config.sub config.guess
endef endef
...@@ -132,4 +126,9 @@ define config-patch ...@@ -132,4 +126,9 @@ define config-patch
$(config-patch-guess) $(config-patch-guess)
endef endef
define config-prepare
$(config-save)
$(config-patch)
endef
# End of Makefile part # 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