Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit99c633b

Browse files
committed
Enable/disable the correct build commands
When building net.sf.j2s.ajax as a PDE project and then a J2S project
1 parent30d9dfc commit99c633b

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

‎Makefile‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ configure:
4444
$(ECLIPSE_ANT) -f configure.xml$(CONFIGURE_FLAGS)
4545

4646
build-plugins: configure
47+
sh switch-build-command.sh sources/net.sf.j2s.ajax/.project\
48+
-net.sf.j2s.core.java2scriptbuilder +org.eclipse.jdt.core.javabuilder
4749
set -e;foriin$(CORE_PLUGINS:%=sources/%);do \
4850
(cd$$i&&$(ECLIPSE_ANT_BUILD)$(CORE_FLAGS); )\
4951
done
@@ -64,6 +66,8 @@ local-install-plugins: build-plugins
6466
BADMETHOD1 = org/eclipse/jdt/internal/compiler/parser/TypeConverter.decodeType
6567
WORKAROUND1 = -vmargs -XX:CompileCommand=exclude,$(BADMETHOD1)
6668
build-libs: local-install-plugins
69+
sh switch-build-command.sh sources/net.sf.j2s.ajax/.project\
70+
+net.sf.j2s.core.java2scriptbuilder -org.eclipse.jdt.core.javabuilder
6771
test! -f*err*.log
6872
set -e;foriin$(CORE_J2SLIB);do \
6973
$(ECLIPSE_J2S) -cmd build -path$$PWD/sources/$$i$(WORKAROUND1);\

‎switch-build-command.sh‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/sh
2+
set -e
3+
4+
enable() {
5+
perl -0 -p \
6+
-e's|<!--\s*(<buildCommand>\s*<name>'"$1"'</name>.*?</buildCommand>\s*)\n\s*-->|\1|gs'
7+
}
8+
9+
disable() {
10+
perl -0 -p \
11+
-e's|\n((\s*)<buildCommand>\s*<name>'"$1"'</name>.*?\n(\s*)</buildCommand>.*?\n)|\n\2<!--\n\1\3-->\n|sg' \
12+
| perl -0 -p \
13+
-e's|<!--\s*(<!--\s*<buildCommand>\s*<name>'"$1"'</name>.*?</buildCommand>\s*-->)\s*-->|\1|gs'
14+
}
15+
16+
file="$1"
17+
shift
18+
19+
while [-n"$1" ];do
20+
case"$1"in
21+
+*) cmd=enable;name="${1#+}";;
22+
-*) cmd=disable;name="${1#-}";;
23+
*)false;;
24+
esac
25+
echo"$cmd""$name"
26+
sed -e's/\r$//g'"$file"|$cmd"$name"| sed -e's/$/\r/g'>"$file.tmp"
27+
mv"$file.tmp""$file"
28+
shift
29+
done

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp