File: autotools-files.mk

package info (click to toggle)
cyphesis-cpp 0.5.16-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 5,084 kB
  • ctags: 3,627
  • sloc: cpp: 30,418; python: 4,812; xml: 4,674; sh: 4,118; makefile: 902; ansic: 617
file content (73 lines) | stat: -rw-r--r-- 3,516 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2002,2003 Colin Walters <walters@debian.org>
# Description: A class to automatically update GNU autotools files
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# 02111-1307 USA.


ifndef _cdbs_bootstrap
_cdbs_scripts_path ?= /usr/lib/cdbs
_cdbs_rules_path ?= /usr/share/cdbs/1/rules
_cdbs_class_path ?= /usr/share/cdbs/1/class
endif

ifndef _cdbs_class_autotools_files
_cdbs_class_autotools_files := 1

include $(CURDIR)/debian/cdbs/autotools-vars.mk$(_cdbs_makefile_suffix)

common-configure-arch common-configure-indep:: debian/stamp-autotools-files
debian/stamp-autotools-files:
	if test "$(DEB_AUTO_UPDATE_LIBTOOL)" = "pre" ; then \
		cd $(DEB_SRCDIR) && libtoolize -c -f ; \
	fi
	if test -n "$(DEB_AUTO_UPDATE_AUTOMAKE)" ; then \
		if test -d $(DEB_SRCDIR)/m4 ; then m4="-I m4" ; fi ; \
		if test -e $(DEB_SRCDIR)/aclocal.m4 ; then cd $(DEB_SRCDIR) && aclocal-$(DEB_AUTO_UPDATE_AUTOMAKE) $(m4) ; fi ; \
	fi
	if test -n "$(DEB_AUTO_UPDATE_AUTOCONF)" ; then \
		if test "$(DEB_AUTO_UPDATE_AUTOCONF)" = "2.50" ; then ac_suffix="" ; else ac_suffix="$(DEB_AUTO_UPDATE_AUTOCONF)" ; fi ; \
		if test -e $(DEB_SRCDIR)/configure.ac || test -e $(DEB_SRCDIR)/configure.in ; then cd $(DEB_SRCDIR) && autoconf$(ac_suffix) ; fi \
	fi
	if test -n "$(DEB_AUTO_UPDATE_AUTOMAKE)" ; then \
		if test -e $(DEB_SRCDIR)/Makefile.am ; then cd $(DEB_SRCDIR) && automake-$(DEB_AUTO_UPDATE_AUTOMAKE) ; fi ; \
	fi
	if [ -r "$(DEB_AC_AUX_DIR)/config.sub" -a ! -f "$(DEB_AC_AUX_DIR)/config.sub.cdbs-orig" -a -r /usr/share/misc/config.sub ] && ! cmp -s "$(DEB_AC_AUX_DIR)/config.sub" /usr/share/misc/config.sub; then \
	   mv "$(DEB_AC_AUX_DIR)/config.sub" "$(DEB_AC_AUX_DIR)/config.sub.cdbs-orig"; \
	   cp -f /usr/share/misc/config.sub "$(DEB_AC_AUX_DIR)/config.sub"; \
	fi
	if [ -r "$(DEB_AC_AUX_DIR)/config.guess" -a ! -f "$(DEB_AC_AUX_DIR)/config.guess.cdbs-orig" -a -r /usr/share/misc/config.guess ] && ! cmp -s "$(DEB_AC_AUX_DIR)/config.guess" /usr/share/misc/config.guess; then \
	   mv "$(DEB_AC_AUX_DIR)/config.guess" "$(DEB_AC_AUX_DIR)/config.guess.cdbs-orig"; \
	   cp -f /usr/share/misc/config.guess "$(DEB_AC_AUX_DIR)/config.guess"; \
	fi
	if test "$(DEB_AUTO_UPDATE_LIBTOOL)" = "post" ; then \
		if test -e $(DEB_SRCDIR)/libtool ; then cp -f /usr/bin/libtool $(DEB_SRCDIR)/libtool ; fi ; \
	fi
	touch debian/stamp-autotools-files

clean::
	if [ -r "$(DEB_AC_AUX_DIR)/config.sub.cdbs-orig" ]; then \
	  mv "$(DEB_AC_AUX_DIR)/config.sub.cdbs-orig" "$(DEB_AC_AUX_DIR)/config.sub"; \
	fi
	if [ -r "$(DEB_AC_AUX_DIR)/config.guess.cdbs-orig" ]; then \
	  mv "$(DEB_AC_AUX_DIR)/config.guess.cdbs-orig" "$(DEB_AC_AUX_DIR)/config.guess"; \
	fi
	if [ -f "$(DEB_BUILDDIR)/config.log" ] && grep -i 'generated.*by.*autoconf' "$(DEB_BUILDDIR)/config.log" 1>/dev/null; then \
	  rm -f "$(DEB_BUILDDIR)/config.log"; \
	fi
	rm -f debian/stamp-autotools-files

endif