File: rules

package info (click to toggle)
antlr 2.7.7+dfsg-9.2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 9,964 kB
  • sloc: java: 54,649; cs: 12,537; makefile: 8,847; cpp: 7,359; pascal: 5,273; sh: 4,333; python: 4,299; lisp: 1,969; xml: 220; lex: 192; ansic: 127
file content (59 lines) | stat: -rwxr-xr-x 1,985 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
#!/usr/bin/make -f

PYTHON3S:=$(shell py3versions -vr 2>/dev/null)

include /usr/share/dpkg/pkg-info.mk

%:
	dh $@ --with maven-repo-helper --with python2,python3

override_dh_auto_configure:
	cp /usr/share/misc/config.* scripts
	JAVAC='/usr/lib/jvm/default-java/bin/javac -source 1.7' CLASSPATH=`pwd` JAVA=/usr/lib/jvm/default-java/bin/java \
	./configure --prefix=/usr --mandir=\$${prefix}/share/man

override_dh_auto_build-indep:
	mkdir -p target/classes
	javac -source 1.7 -target 1.7 -d target/classes $(shell find antlr -name '*.java')
	jar cvf antlr.jar -C target/classes .

	cp bin/antlr target/runantlr

override_dh_auto_build-arch:
	$(MAKE) -C lib/cpp CXXFLAGS="+ -fPIC -DPIC"
	mv -f lib/cpp/src/libantlr.a debian/libantlr-pic.a

	$(MAKE) -C lib/cpp clean all

override_dh_auto_test:

override_dh_auto_install-indep:
	set -e && cd lib/python && python setup.py install --install-layout=deb --root $(CURDIR)/debian/python-antlr && cd ..
	set -e && cd lib/python && for pyvers in $(PYTHON3S); do \
		python$$pyvers setup.py install --install-layout=deb --root $(CURDIR)/debian/python3-antlr ; \
	done && cd ..

override_dh_auto_install-arch:
	$(MAKE) -C lib/cpp install prefix=`pwd`/debian/libantlr-dev/usr

override_dh_installchangelogs:
	dh_installchangelogs -- CHANGES.txt

override_dh_installdocs:
	dh_installdocs
	rm -f debian/antlr-doc/usr/share/doc/antlr-doc/csharp-runtime.html
	rm -f debian/antlr-doc/usr/share/doc/antlr-doc/Makefile*

override_dh_installexamples:
	dh_installexamples
	find debian/antlr-doc/usr/share/doc/antlr-doc/examples -type f -print | xargs -r chmod 0644
	rm -rf debian/antlr-doc/usr/share/doc/antlr-doc/examples/csharp

override_dh_auto_clean:
	-cd lib/cpp; $(MAKE) clean
	-find -name Makefile | xargs rm -f
	-rm -rf lib/python/build
	-rm -rf scripts/run-antlr

get-orig-pom:
	wget -O debian/pom.xml http://repository.sonatype.org/service/local/repositories/central/content/antlr/antlr/$(DEB_VERSION_UPSTREAM)/antlr-$(DEB_VERSION_UPSTREAM).pom