File: rules

package info (click to toggle)
cmake 2.4.5-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 16,804 kB
  • ctags: 18,861
  • sloc: cpp: 84,497; ansic: 84,379; yacc: 3,136; sh: 1,970; lex: 1,004; lisp: 119; makefile: 89; xml: 88; perl: 60; tcl: 55; python: 25; php: 25; ruby: 22; java: 20; f90: 19; fortran: 3
file content (143 lines) | stat: -rwxr-xr-x 4,552 bytes parent folder | download
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This is the debhelper compatability version to use.
export DH_COMPAT=5

# The next line will cause Dart to be used if it is installed...
#DARTP=$(shell if [ -d /usr/share/Dart ]; then echo USE_DART; else echo DONT_USE_DART; fi )
DARTP=DONT_USE_DART

PWD=$(shell pwd)
DVER=$(shell cat /etc/debian_version)
DARCH=$(shell dpkg --print-installation-architecture)
GPPVER=$(shell dpkg --status g++ | grep Version | cut -d ' ' -f 2)

CFLAGS = -Wall -g
INSTALL = install
INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
INSTALL_SCRIPT  = $(INSTALL) -p    -o root -g root  -m  755
INSTALL_DIR     = $(INSTALL) -p -d -o root -g root  -m  755

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif

# Hack for parisc64 to close bug #133696
ifeq ($(shell arch),parisc64)
CFLAGS += -ffunction-sections
else
endif

configure: configure-stamp
configure-stamp:
	dh_testdir
	# Add here commands to configure the package.
	# pre-load the cache to avoid setting rpath:
	mkdir -p Build
	echo CMAKE_SKIP_RPATH:BOOL=YES > Build/CMakeCache.txt
	#echo TARGET_VERSION:STRING= >> Build/CMakeCache.txt
	#echo TARGET_SOVERSION:STRING= >> Build/CMakeCache.txt
	#echo BUILD_DOCUMENTATION:BOOL=ON >> Build/CMakeCache.txt
	#echo BUILD_DOXYGEN:BOOL=ON >> Build/CMakeCache.txt
	#echo BUILD_WXDialog:BOOL=ON >> Build/CMakeCache.txt
	(if [[ $(DARTP) == "USE_DART" ]]; then echo DART_ROOT:PATH=/usr/share/Dart >> Build/CMakeCache.txt; fi)
	echo VERBOSE_BUILD:BOOL=ON >> Build/CMakeCache.txt
	echo CMAKE_C_FLAGS:STRING=$(CFLAGS) >> Build/CMakeCache.txt
	echo CMAKE_CXX_FLAGS:STRING=$(CFLAGS) >> Build/CMakeCache.txt
	(if [[ $(DARTP) == "USE_DART" ]]; then echo BUILDNAME:STRING=cmake_2.2.3-1_$(DARCH).deb >> Build/CMakeCache.txt; fi)
	(cd Build ; ../bootstrap --prefix=/usr --docdir=/share/doc/cmake --mandir=/share/man)
	chmod -x ChangeLog.manual
	chmod -x Modules/*.cmake Modules/*.cxx Modules/Platform/Windows-gcc.cmake Modules/Platform/Windows-icl.cmake
	chmod -x Modules/Platform/CYGWIN-g77.cmake Modules/CMakeRCCompiler.cmake.in Modules/CMakeFortranCompiler.cmake.in
	chmod -x Modules/Platform/*
	touch configure-stamp

build: configure-stamp build-stamp
build-stamp:
	dh_testdir

	# Add here commands to compile the package.
	(if [[ $(DARTP) == "USE_DART" ]]; then (cd Build ; $(MAKE) Experimental ); else (cd Build ; $(MAKE) );fi)
	(if [[ $(DARTP) == "USE_DART" ]]; then (cd Build ; $(MAKE) ExperimentalSubmit ); fi)
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

	# Add here commands to clean up after the build process.
	#if [ -x Source/cmake ]; then $(MAKE) clean ; fi
	#rm -f config.cache
	#rm -f config.status
	rm -rf Build
	rm -rf debian/cmake
	rm -f  debian/cmake.emacsen-install
	rm -f  debian/ccmake.1  debian/cmake.1  debian/ctest.1
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Add here commands to install the package into debian/cmake.
	export DESTDIR=$(CURDIR)/debian/cmake ;\
	(cd Build ; $(MAKE) install )
	install -D -m 644 debian/cmake.xpm debian/cmake/usr/share/pixmaps/cmake.xpm
	#cp Docs/cmake-indent.vim debian/cmake/usr/share/vim/addons/indent/cmake.vim
	#cp Docs/cmake-syntax.vim debian/cmake/usr/share/vim/addons/syntax/cmake.vim
	#cp Docs/cmake-mode.el debian/cmake/usr/share/emacs/site-lisp/
	Build/bin/ccmake --help-man > debian/ccmake.1
	Build/bin/cmake --help-man > debian/cmake.1
	#Build/bin/cpack --help-man > debian/cpack.1
	Build/bin/ctest --help-man > debian/ctest.1

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
#	dh_installdebconf	
	dh_installdocs
	dh_installexamples
	dh_installmenu
#	dh_installlogrotate
	dh_installemacsen
#	dh_installpam
#	dh_installmime
#	dh_installinit
	dh_installcron
	dh_installman
	dh_installinfo
#	dh_undocumented
	dh_installchangelogs ChangeLog.txt ChangeLog.manual
	dh_link
	dh_strip
	dh_compress -XCMake.pdf
	dh_fixperms
#	dh_makeshlibs
	dh_installdeb
#	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure