File: Makefile

package info (click to toggle)
node-libnpx 10.2.0%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 936 kB
  • sloc: makefile: 41; sh: 26
file content (24 lines) | stat: -rw-r--r-- 665 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
text-files = README.md CHANGELOG.md LICENSE.md

bin: bin/npx.1 bin/package.json bin/node_modules $(text-files)

bin/%: $(text-files)
	cp $(text-files) bin/

bin/npx.1: libnpx.1
	cat $< | sed s/libnpx/npx/ > $@

libnpx.1: README.md
	npm run docs

bin/package.json: package.json bin/package.template.json
	cat bin/package.template.json | npx json -e "this.version = '$$(cat package.json | npx json version)'" > $@
	npx json -I -f $@ -e "this.dependencies.libnpx = '$$(cat $@ | npx json version)'"

bin/node_modules: bin/package.json
	cd bin && npm i

clean:
	rm -rf bin/npx.1 bin/package.json bin/node_modules libnpx.1 $(addprefix bin/, $(text-files))

.PHONY: clean