This repository was archived by the owner on Apr 22, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed
Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,13 @@ distrib.tstamp: src/prettify.js src/run_prettify.js src/*.js src/*.css
8080 done
8181 @touch distrib.tstamp
8282
83+ lang-aliases : lang-aliases.tstamp
84+ lang-aliases.tstamp : distrib.tstamp
85+ @tools/lang-handler-aliases.sh \
86+ distrib/sources/google-code-prettify/src \
87+ | perl -ne 'system("cp $$1 $$2") if m/^(\S+) (\S+)$$/ && ! -e $$2' \
88+ && touch lang-aliases.tstamp
89+
8390% .tgz : % .tar
8491 @gzip -c -9 $^ > $@
8592
@@ -101,3 +108,4 @@ distrib/prettify.tar: distrib.tstamp
101108 examples js-modules src styles tests tools \
102109 distrib/sources/google-code-prettify
103110 tar cf distrib/prettify.tar -C distrib/sources google-code-prettify
111+
Original file line number Diff line number Diff line change 123123# Make the distribution
124124function build() {
125125 pushd " $VERSION_BASE /trunk" > /dev/null
126- make distrib distrib/prettify.tar.bz2 distrib/prettify-small.tar.bz2
126+ make clean \
127+ && make distrib distrib/prettify.tar.bz2 distrib/prettify-small.tar.bz2 \
128+ && make lang-aliases
127129 local status=$?
128130 popd > /dev/null
129131 (( $status ))
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ if [ -n "$*" ] || [ -z "$LANG_DIR" ] || ! (( $HAS_LANG_FILES )); then
1212 echo " Usage: $0 <LANG_DIR>"
1313 echo
1414 echo " Dumps lines of the form"
15- echo " lang-foo.js : <extension>"
15+ echo " $LANG_DIR / lang-foo.js $LANG_DIR /lang- <extension>.js "
1616 echo " where the first element is a path name under LANG_DIR"
1717 echo " and the second is the name of a language extension for which"
1818 echo " it registers an extension."
@@ -60,6 +60,8 @@ for JS in "$LANG_DIR"/lang-*.js; do
6060 " $JS " \
6161 < /dev/null \
6262 || echo " Failed to execute $JS " 1>&2 ) \
63- | perl -e ' $BASE=shift; while (<STDIN>) { s/^(?=\w)/$BASE : /; print; }' \
64- " $( basename " $JS " ) "
63+ | perl -e ' $JS=shift;' \
64+ -e ' use File::Basename; $DIR=dirname($JS);' \
65+ -e ' while (<STDIN>) { s/^\w+$/$JS $DIR\/lang-$&.js/; print; }' \
66+ " $JS "
6567done
You can’t perform that action at this time.
0 commit comments