File: rules

package info (click to toggle)
node-buble 0.19.4-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,268 kB
  • sloc: makefile: 42; sh: 15
file content (57 lines) | stat: -rwxr-xr-x 1,581 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
#!/usr/bin/make -f

%:
	dh $@

ROLLUP?=rollup


MAKE_STAGED_DIR=set -e;mkdir -p $1;cp -r src $1;cp -r test $1;cp -r bin $1;cp package.json $1;cp rollup.config.js $1;cp rollup.create-config.js $1

SRC_SRC=$(shell find src -name '*' | LC_ALL=C sort)
SRC_BIN=$(shell find bin -name '*' | LC_ALL=C sort)
SRC_ALL=$(SRC_SRC) $(SRC_BIN) package.json rollup.config.js rollup.create-config.js

stage1/build.stamp: $(SRC_ALL)
	$(call MAKE_STAGED_DIR,$(dir $@))
	cd $(dir $@) && $(ROLLUP_ENV) $(ROLLUP) -c
	chmod +x $(dir $@)/bin/buble
	touch $@

stage2/build.stamp: stage1/build.stamp
	$(call MAKE_STAGED_DIR,$(dir $@))
	mkdir -p $(dir $@)/node_modules
	ln -s stage1/ $(dir $@)/node_modules/buble
	cd $(dir $@) && $(ROLLUP_ENV) $(ROLLUP) -c
	chmod +x $(dir $@)/bin/buble
	touch $@

stage3/build.stamp: stage2/build.stamp
	$(call MAKE_STAGED_DIR,$(dir $@))
	mkdir -p $(dir $@)/node_modules
	ln -s stage2/ $(dir $@)/node_modules/buble
	cd $(dir $@) && $(ROLLUP_ENV) $(ROLLUP) -c
	chmod +x $(dir $@)/bin/buble
	touch $@

override_dh_auto_build: stage3/build.stamp
	ln -s stage3/dist dist


# micromatch is too old
test_package: stage3/build.stamp
	cd stage3 && mocha -R spec
.PHONY: test_package

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
override_dh_auto_test: test_package
else
override_dh_auto_test:
	@echo '**********************************************************'
	@echo 'Skip test suite                                           '
	@echo '**********************************************************'
endif	

override_dh_auto_clean:
	rm -f dist
	rm -rf stage*