File: rules

package info (click to toggle)
javatools 0.48%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 416 kB
  • ctags: 72
  • sloc: sh: 1,515; perl: 930; makefile: 35
file content (48 lines) | stat: -rwxr-xr-x 1,628 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

VERSION=$(shell dpkg-parsechangelog | sed -n 's/^Version: //p')

POD2MAN=pod2man --stderr --utf8 -c Javahelper -r "$(VERSION)"

MOD_PATH:=lib/Debian/Javahelper

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	jobs = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	PAR_ARGS=-j $(jobs)
endif

%:
	dh $@

jh_lib.sh: jh_lib.sh.in
	sed 's,%JAVATOOLS_VERSION%,${VERSION},' < $< > $@

override_dh_auto_build: jh_lib.sh
	mkdir tmp tmp.jarwrapper
	# javahelper pod-based manpages
	$(POD2MAN) jh_installeclipse tmp/jh_installeclipse.1
	$(POD2MAN) jh_generateorbitdir tmp/jh_generateorbitdir.1
	$(POD2MAN) jh_setupenvironment tmp/jh_setupenvironment.1
	$(POD2MAN) jh_compilefeatures tmp/jh_compilefeatures.1
	$(POD2MAN) jh_manifest tmp/jh_manifest.1
	$(POD2MAN) fetch-eclipse-source.pod tmp/fetch-eclipse-source.1
	$(POD2MAN) -s 1 jh_clean.pod tmp/jh_clean.1
	$(POD2MAN) $(MOD_PATH)/Eclipse.pm tmp/Debian::Javahelper::Eclipse.3
	$(POD2MAN) $(MOD_PATH)/Java.pm tmp/Debian::Javahelper::Java.3
	$(POD2MAN) $(MOD_PATH)/Manifest.pm tmp/Debian::Javahelper::Manifest.3
	$(POD2MAN) $(MOD_PATH)/ManifestSection.pm tmp/Debian::Javahelper::ManifestSection.3
	# jarwrapper pod-based manpages
	$(POD2MAN) -s 1 jarwrapper.pod tmp.jarwrapper/jarwrapper.1
	$(POD2MAN) -s 1 jardetector.pod tmp.jarwrapper/jardetector.1
	markdown --html4tags tutorial.txt | \
		cat tutorial-header.html - tutorial-footer.html > tutorial.html

runtests: jh_lib.sh
	prove -Ilib $(PAR_ARGS) t
	cd tests && ./tests.sh

override_dh_auto_test: runtests

override_dh_auto_clean:
	rm -f jh_lib.sh tutorial.html
	rm -fr tmp tmp.jarwrapper