[Pkg-javascript-commits] [acorn] 07/07: Improve rules by using SED_EXPR
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Aug 18 11:49:15 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository acorn.
commit 2178a450a6bf25df29a044d6dd35863c2809f8ef
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date: Fri Aug 18 13:41:45 2017 +0200
Improve rules by using SED_EXPR
---
debian/rules | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/debian/rules b/debian/rules
index 6567629..3aa0d8f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,38 +7,33 @@ MANPAGES := $(subst .xml,, $(wildcard debian/man/*.*.xml))
SOURCES = $(shell find src/ -name "*.js")
TARGETS = $(subst src, dist, $(SOURCES))
COMPILE_MODULES = compile-modules convert -f commonjs -I/usr/lib/nodejs/graceful-fs -I/usr/lib/nodejs/ast-types/lib
+SED_EXPR = -e 's/$$.tokTypes/$$.types/g' -e 's/$$.tokContexts/$$.types/g' -e 's/new Parser/new $$$$state$$$$.Parser/g'
%:
dh $@
-override_dh_clean:
- dh_clean debian/man/*.1 *.min.js
-# ugly recreate spurious upstream file (need a +ds revision instead)
- mkdir dist
- touch dist/.keep
- ln -s acorn.js dist/acorn_csp.js
-
override_dh_auto_build: dist $(TARGETS) $(MANPAGES)
# I guess rollup is better than node-es6-module-transpiler...
# but we don't have rollup (yet)
- sed -i dist/index.js -e's/$$.tokTypes/$$.types/g'
- sed -i dist/index.js -e 's/$$.tokContexts/$$.types/g'
- sed -i dist/index.js -e 's/new Parser/new $$$$state$$$$.Parser/g'
+ find dist -name index.js -exec sed -i {} $(SED_EXPR) \;
mv dist/bin/acorn.js dist/bin/acorn
chmod a+x dist/bin/acorn
sed -i dist/bin/acorn -e 's/\$$//g'
sed -i dist/bin/acorn -e 's/node /nodejs /g'
sed -i dist/bin/acorn -e 's|"use strict";|#!/usr/bin/nodejs|'
+ # recreate symlink
+ ln -s dist/index.js acorn.js
+ ln -s dist/index.js index.js
+ ln -s index.js dist/acorn.js
+ ln -s loose dist/acorn_loose
+
.PHONY: dist
dist:
+ mkdir -p dist
mkdir -p dist/bin
mkdir -p dist/loose
mkdir -p dist/walk
- ln -s dist/index.js acorn.js
- ln -s dist/index.js index.js
- ln -s index.js dist/acorn.js
- ln -s loose dist/acorn_loose
dist/bin/acorn.js: dist/index.js
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/acorn.git
More information about the Pkg-javascript-commits
mailing list