File: rules

package info (click to toggle)
ants 1.9.2+svn680.dfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 12,136 kB
  • sloc: cpp: 41,966; sh: 2,545; perl: 216; makefile: 43
file content (67 lines) | stat: -rwxr-xr-x 1,917 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
#!/usr/bin/make -f
# -*- makefile -*-

# Build directory, to don't dig them out later
# on from the bulk since there is no install target in upstream build system
BUILDDIR=$(CURDIR)/build
DESTBINDIR=$(BUILDDIR)/bin

export CFLAGS = -Wall -g
export LDFLAGS = -Wl,--as-needed

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
    export CFLAGS += -O0
else
    export CFLAGS += -O2
endif
export CXXFLAGS = $(CFLAGS) -fpermissive

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

# Default mega-rule
%:
	dh -DExamples $@


override_dh_auto_configure:
	dh_auto_configure -- \
		-DCOPY_SCRIPT_FILES_TO_BIN_DIR:BOOL=OFF \
		-DCMAKE_SKIP_RPATH:BOOL=ON \
		-DEXECUTABLE_OUTPUT_PATH:PATH=$(DESTBINDIR)

override_dh_auto_build:
	dh_auto_build
	: Build manpages
	cd $(DESTBINDIR) && mkdir ../man && \
    for f in *; do \
	 help2man --name="part of ANTS registration suite" --version-string 1.9 \
	          --no-info --no-discard-stderr ./$$f >| ../man/$$f.1; \
     done

# For now perform only some small subselection of tests since some
# tests are very CPU intensive and some fail and there is no clean way
# to select "good" and quick ones
override_dh_auto_test:
	# debhelper just calls make test so no -R could be passed
	# PATH=$$PATH:$(DESTBINDIR) dh_auto_test -- -R "ANTS_(CC_1|...$$)"
	# thus lets do it manually
	cd obj-*; PATH=$(DESTBINDIR):$$PATH ctest --force-new-ctest-process -R "ANTS_(CC_1|SYN_|EXP|...$$)" -E "(ANTS_SYN|ANTS_SYN_WITH_TIME)$$"

override_dh_auto_install:
	dh_auto_install
	: Install binaries
	install -t debian/ants/usr/lib/ants $(DESTBINDIR)/*
	: Symlink binaries of primary importance into /usr/bin
	for f in ANTS WarpImageMultiTransform; do \
		dh_link usr/lib/ants/$$f usr/bin/$$f; \
	done
	: Install shell scripts
	install -t debian/ants/usr/lib/ants Scripts/*
	: Install manpages
	dh_installman $(BUILDDIR)/man/*

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(BUILDDIR)