~ubuntu-branches/ubuntu/vivid/kdesudo/vivid

« back to all changes in this revision

Viewing changes to debian/cdbs/cmake.mk

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2008-07-16 17:08:30 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20080716170830-bem298ajm207fua9
Tags: 3.2-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- mode: makefile; coding: utf-8 -*-
 
2
# Copyright (C) 2006 Peter Rockai <me@mornfall.net>
 
3
# Copyright (C) 2006 Fathi Boudra <fboudra@free.fr>
 
4
# Description: A class for cmake packages
 
5
#
 
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.
 
10
#
 
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.
 
15
#
 
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
 
19
# 02111-1307 USA.
 
20
 
 
21
ifndef _cdbs_bootstrap
 
22
_cdbs_scripts_path ?= /usr/lib/cdbs
 
23
_cdbs_rules_path ?= /usr/share/cdbs/1/rules
 
24
_cdbs_class_path ?= /usr/share/cdbs/1/class
 
25
endif
 
26
 
 
27
ifndef _cdbs_class_cmake
 
28
_cdbs_class_cmake := 1
 
29
 
 
30
include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
 
31
 
 
32
ifdef _cdbs_tarball_dir
 
33
DEB_BUILDDIR = $(_cdbs_tarball_dir)/obj-$(DEB_BUILD_GNU_TYPE)
 
34
else
 
35
DEB_BUILDDIR = obj-$(DEB_BUILD_GNU_TYPE)
 
36
endif
 
37
 
 
38
DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(DEB_DESTDIR)
 
39
DEB_CMAKE_PREFIX =/usr
 
40
 
 
41
# Overriden from makefile-vars.mk
 
42
# We pass CFLAGS and friends to ./configure, so no need to pass them to make
 
43
DEB_MAKE_INVOKE = $(DEB_MAKE_ENVVARS) $(MAKE) -C $(DEB_BUILDDIR)
 
44
 
 
45
include $(_cdbs_class_path)/makefile.mk$(_cdbs_makefile_suffix)
 
46
 
 
47
common-configure-arch common-configure-indep:: common-configure-impl
 
48
common-configure-impl:: $(DEB_BUILDDIR)/CMakeCache.txt
 
49
$(DEB_BUILDDIR)/CMakeCache.txt:
 
50
        cd $(DEB_BUILDDIR) && cmake $(CURDIR)/$(DEB_SRCDIR) \
 
51
        -DCMAKE_INSTALL_PREFIX="$(DEB_CMAKE_PREFIX)" \
 
52
        $(DEB_CMAKE_EXTRA_FLAGS) -DCMAKE_CXX_FLAGS="$(CXXFLAGS)" \
 
53
        -DCMAKE_C_FLAGS="$(CFLAGS)" -DCMAKE_VERBOSE_MAKEFILE=ON
 
54
        mkdir -p $(DEB_DESTDIR)
 
55
 
 
56
cleanbuilddir::
 
57
        -if test "$(DEB_BUILDDIR)" != "$(DEB_SRCDIR)"; then rm -rf $(DEB_BUILDDIR); fi
 
58
 
 
59
endif
 
60