~ubuntu-branches/ubuntu/utopic/checkpolicy/utopic-proposed

« back to all changes in this revision

Viewing changes to debian/common/archvars.mk

  • Committer: Package Import Robot
  • Author(s): Laurent Bigonville
  • Date: 2012-03-27 20:22:24 UTC
  • Revision ID: package-import@ubuntu.com-20120327202224-wcmz9qko6u35sqkd
Tags: 2.1.8-2
* Team upload.
* Switch to debhelper sequence
* debian/control:
  - Bump Standards-Version to 3.9.3
  - Add Homepage field
  - Update Vcs-* fields
  - Make checkpolicy arch linux-any
  - Put under the Debian SELinux team maintenance
* Add debian/gbp.conf file
* debian/rules: Append CPPFLAGS hardening flags to CFLAGS as build system is
  not using CPPFLAGS

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
############################ -*- Mode: Makefile -*- ###########################
2
 
## archvars.mk --- 
3
 
## Author           : Manoj Srivastava ( srivasta@golden-gryphon.com ) 
4
 
## Created On       : Sat Nov 15 02:40:56 2003
5
 
## Created On Node  : glaurung.green-gryphon.com
6
 
## Last Modified By : Manoj Srivastava
7
 
## Last Modified On : Tue Nov 16 23:36:15 2004
8
 
## Last Machine Used: glaurung.internal.golden-gryphon.com
9
 
## Update Count     : 5
10
 
## Status           : Unknown, Use with caution!
11
 
## HISTORY          : 
12
 
## Description      : calls dpkg-architecture and sets up various arch
13
 
##                    related variables
14
 
## 
15
 
## arch-tag: e16dd848-0fd6-4c0e-ae66-bef20d1f7c63
16
 
## 
17
 
## This program is free software; you can redistribute it and/or modify
18
 
## it under the terms of the GNU General Public License as published by
19
 
## the Free Software Foundation; either version 2 of the License, or
20
 
## (at your option) any later version.
21
 
##
22
 
## This program is distributed in the hope that it will be useful,
23
 
## but WITHOUT ANY WARRANTY; without even the implied warranty of
24
 
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25
 
## GNU General Public License for more details.
26
 
##
27
 
## You should have received a copy of the GNU General Public License
28
 
## along with this program; if not, write to the Free Software
29
 
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
30
 
##
31
 
###############################################################################
32
 
 
33
 
 
34
 
DPKG_ARCH := dpkg-architecture
35
 
 
36
 
ifeq ($(strip $(KPKG_ARCH)),um)
37
 
  MAKING_VIRTUAL_IMAGE:=YES
38
 
endif
39
 
ifeq ($(strip $(KPKG_ARCH)),xen)
40
 
  MAKING_VIRTUAL_IMAGE:=YES
41
 
endif
42
 
 
43
 
ifneq ($(strip $(CONFIG_UM)),)
44
 
  MAKING_VIRTUAL_IMAGE:=YES
45
 
  KPKG_ARCH=um
46
 
endif
47
 
 
48
 
ifneq ($(strip $(CONFIG_XEN)),)
49
 
  MAKING_VIRTUAL_IMAGE:=YES
50
 
  ifneq ($(strip $(CONFIG_X86_XEN)$(CONFIG_X86_64_XEN)),)
51
 
    KPKG_SUBARCH=xen
52
 
  else
53
 
    KPKG_ARCH=xen
54
 
    ifeq ($(strip $(CONFIG_XEN_PRIVILEGED_GUEST)),)
55
 
      KPKG_SUBARCH=xenu
56
 
    else
57
 
      KPKG_SUBARCH=xen0
58
 
    endif
59
 
  endif
60
 
endif
61
 
 
62
 
ifdef KPKG_ARCH
63
 
  ifeq ($(strip $(MAKING_VIRTUAL_IMAGE)),)
64
 
    ifneq ($(CROSS_COMPILE),-)
65
 
      ha:=-a$(KPKG_ARCH)
66
 
    endif
67
 
  endif
68
 
endif
69
 
 
70
 
# set the dpkg-architecture vars
71
 
export DEB_BUILD_ARCH      := $(shell $(DPKG_ARCH)       -qDEB_BUILD_ARCH)
72
 
export DEB_BUILD_GNU_CPU   := $(shell $(DPKG_ARCH)       -qDEB_BUILD_GNU_CPU)
73
 
export DEB_BUILD_GNU_SYSTEM:= $(shell $(DPKG_ARCH)       -qDEB_BUILD_GNU_SYSTEM)
74
 
export DEB_BUILD_GNU_TYPE  := $(shell $(DPKG_ARCH)       -qDEB_BUILD_GNU_TYPE)
75
 
export DEB_HOST_ARCH       := $(shell $(DPKG_ARCH) $(ha) -qDEB_HOST_ARCH)
76
 
export DEB_HOST_ARCH_OS    := $(shell $(DPKG_ARCH) $(ha) -qDEB_HOST_ARCH_OS      \
77
 
                                2>/dev/null|| true)
78
 
export DEB_HOST_ARCH_CPU   := $(shell $(DPKG_ARCH) $(ha) -qDEB_HOST_ARCH_CPU     \
79
 
                                2>/dev/null|| true)
80
 
export DEB_HOST_GNU_CPU    := $(shell $(DPKG_ARCH) $(ha) -qDEB_HOST_GNU_CPU)
81
 
export DEB_HOST_GNU_SYSTEM := $(shell $(DPKG_ARCH) $(ha) -qDEB_HOST_GNU_SYSTEM)
82
 
export DEB_HOST_GNU_TYPE   := $(shell $(DPKG_ARCH) $(ha) -qDEB_HOST_GNU_TYPE)
83
 
 
84
 
# arrgh. future proofing
85
 
ifeq ($(DEB_HOST_GNU_SYSTEM), linux)
86
 
  DEB_HOST_GNU_SYSTEM=linux-gnu
87
 
endif
88
 
ifeq ($(DEB_HOST_ARCH_OS),)
89
 
  ifeq ($(DEB_HOST_GNU_SYSTEM), linux-gnu)
90
 
    DEB_HOST_ARCH_OS := linux
91
 
  endif
92
 
  ifeq ($(DEB_HOST_GNU_SYSTEM), kfreebsd-gnu)
93
 
    DEB_HOST_ARCH_OS := kfreebsd
94
 
  endif
95
 
endif
96
 
 
97
 
REASON = @if [ -f $@ ]; then \
98
 
 echo "====== making $(notdir $@) because of $(notdir $?) ======";\
99
 
 else \
100
 
   echo "====== making target $@ [new prereqs: $(notdir $?)]======"; \
101
 
 fi
102
 
 
103
 
OLDREASON = @if [ -f $@ ]; then \
104
 
 echo "====== making $(notdir $@) because of $(notdir $?) ======";\
105
 
 else \
106
 
   echo "====== making (creating) $(notdir $@) ======"; \
107
 
 fi
108
 
 
109
 
LIBREASON = @echo "====== making $(notdir $@)($(notdir $%))because of $(notdir $?)======"
110
 
 
111
 
 
112
 
# macro outputing $(1) if DEBUG_DEBIAN_RULES is set, and resolving it
113
 
# in all cases usage $(call doit,some shell command)
114
 
doit = $(if $(DEBUG_DEBIAN_RULES),$(warning DEBUG: $(1)))$(shell $(1))
115
 
 
116
 
#Local variables:
117
 
#mode: makefile
118
 
#End: