1
# -*- mode: makefile; coding: utf-8 -*-
2
# Copyright © 2002,2003 Colin Walters <walters@debian.org>
3
# Copyright © 2008 Jonas Smedegaard <dr@jones.dk>
4
# Description: Common variables for GNU autoconf+automake packages
6
# This program is free software; you can redistribute it and/or
7
# modify it under the terms of the GNU General Public License as
8
# published by the Free Software Foundation; either version 2, or (at
9
# your option) any later version.
11
# This program is distributed in the hope that it will be useful, but
12
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
# General Public License for more details.
16
# You should have received a copy of the GNU General Public License
17
# along with this program; if not, write to the Free Software
18
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21
_cdbs_scripts_path ?= /usr/lib/cdbs
22
_cdbs_rules_path ?= /usr/share/cdbs/1/rules
23
_cdbs_class_path ?= /usr/share/cdbs/1/class
25
ifndef _cdbs_class_autotools_vars
26
_cdbs_class_autotools_vars = 1
28
#include $(_cdbs_class_path)/makefile.mk$(_cdbs_makefile_suffix)
29
include debian/cdbs/1/class/makefile.mk
31
DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(cdbs_curpkgdestdir)
32
DEB_MAKE_CLEAN_TARGET = distclean
33
#DEB_MAKE_CHECK_TARGET = check
35
DEB_AC_AUX_DIR = $(DEB_SRCDIR)
37
DEB_CONFIGURE_SCRIPT = $(CURDIR)/$(DEB_SRCDIR)/configure
38
DEB_CONFIGURE_SCRIPT_ENV = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"
39
DEB_CONFIGURE_NORMAL_ARGS = --build=$(DEB_BUILD_GNU_TYPE) --prefix=$(DEB_CONFIGURE_PREFIX) --includedir=$(DEB_CONFIGURE_INCLUDEDIR) --mandir=$(DEB_CONFIGURE_MANDIR) --infodir=$(DEB_CONFIGURE_INFODIR) --sysconfdir=$(DEB_CONFIGURE_SYSCONFDIR) --localstatedir=$(DEB_CONFIGURE_LOCALSTATEDIR) --libexecdir=$(DEB_CONFIGURE_LIBEXECDIR) --disable-maintainer-mode --disable-dependency-tracking
41
# Provide --host only if different from --build, as recommended in
42
# autotools-dev README.Debian: When provided (even if equal) autotools
43
# 2.52+ switches to cross-compiling mode.
45
ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
46
DEB_CONFIGURE_NORMAL_ARGS += --host=$(DEB_HOST_GNU_TYPE)
49
### TODO: Fix the above to also handle 2.13 which needs other tweaks
50
### (read autotools-dev README.Debian!). For now we conflict with
53
# This magic is required because otherwise configure wants to analyse
54
# $0 to see whether a VPATH build is needed. This tells it with
55
# absolute certainly that this is NOT a VPATH build.
56
DEB_CONFIGURE_NORMAL_ARGS += $(if $(subst $(DEB_SRCDIR),,$(cdbs_make_curbuilddir)),,--srcdir=.)
58
DEB_CONFIGURE_INVOKE = cd $(cdbs_make_curbuilddir) && $(DEB_CONFIGURE_SCRIPT_ENV) $(DEB_CONFIGURE_SCRIPT) $(DEB_CONFIGURE_NORMAL_ARGS)
59
DEB_CONFIGURE_PREFIX =/usr
60
DEB_CONFIGURE_INCLUDEDIR = "\$${prefix}/include"
61
DEB_CONFIGURE_MANDIR ="\$${prefix}/share/man"
62
DEB_CONFIGURE_INFODIR ="\$${prefix}/share/info"
63
DEB_CONFIGURE_SYSCONFDIR =/etc
64
DEB_CONFIGURE_LOCALSTATEDIR =/var
65
DEB_CONFIGURE_LIBEXECDIR ="\$${prefix}/lib/$(DEB_SOURCE_PACKAGE)"
66
DEB_CONFIGURE_EXTRA_FLAGS =
68
ifneq (, $(DEB_AUTO_UPDATE_LIBTOOL))
69
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), libtool
72
ifneq (:, $(DEB_AUTO_UPDATE_ACLOCAL):$(DEB_AUTO_UPDATE_AUTOMAKE))
73
ifeq ($(DEB_AUTO_UPDATE_ACLOCAL), $(DEB_AUTO_UPDATE_AUTOMAKE))
74
# avoid duped build-dependencies
75
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), automake$(DEB_AUTO_UPDATE_ACLOCAL)
77
# either only one of them is required, or different versions are
78
ifneq (, $(DEB_AUTO_UPDATE_ACLOCAL))
79
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), automake$(DEB_AUTO_UPDATE_ACLOCAL)
81
ifneq (, $(DEB_AUTO_UPDATE_AUTOMAKE))
82
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), automake$(DEB_AUTO_UPDATE_AUTOMAKE)
87
ifneq (:, $(DEB_AUTO_UPDATE_AUTOCONF):$(DEB_AUTO_UPDATE_AUTOHEADER))
88
ifeq ($(DEB_AUTO_UPDATE_AUTOCONF), $(DEB_AUTO_UPDATE_AUTOHEADER))
89
# avoid duped build-dependencies
90
ifeq ($(DEB_AUTO_UPDATE_AUTOCONF), 2.13)
91
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), autoconf2.13
93
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), autoconf
96
# either only one of them is required, or different versions are
97
ifneq (, $(DEB_AUTO_UPDATE_AUTOCONF))
98
ifeq ($(DEB_AUTO_UPDATE_AUTOCONF), 2.13)
99
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), autoconf2.13
101
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), autoconf
104
ifneq (, $(DEB_AUTO_UPDATE_AUTOHEADER))
105
ifeq ($(DEB_AUTO_UPDATE_AUTOHEADER), 2.13)
106
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), autoconf2.13
108
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), autoconf