File: rules

package info (click to toggle)
node-nan 2.24.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,188 kB
  • sloc: cpp: 8,007; ansic: 1,604; javascript: 1,588; makefile: 134; sh: 34
file content (39 lines) | stat: -rwxr-xr-x 930 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-

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

%:
	dh $@ --with nodejs

debian/testdir/examples:
	test -d debian/testdir || mkdir -p debian/testdir
	cp -rf examples debian/testdir

testexamples: debian/testdir/examples node_modules/nan
	V=1 node-gyp rebuild --directory debian/testdir/examples/async_pi_estimate/
	node debian/testdir/examples/async_pi_estimate/addon.js

node_modules/nan:
	test -d node_modules || mkdir node_modules
	ln -s .. node_modules/nan

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
override_dh_auto_test: testexamples
	V=1 node-gyp rebuild --directory test
	tap -R spec --gc test/js/*-test.js
else:
override_dh_auto_test:
endif

override_dh_auto_clean:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
	-node-gyp clean
endif
	dh_auto_clean
	rm -rf debian/testdir
	rm -rf node_modules

.PHONY=testexamples