nitc
nitdoc
nitdoc.*
+logs
+nit_compile
--- /dev/null
+all:
+ ./bench_engines.sh all
+
+check:
+ ./bench_engines.sh --fast --fast bench_nitc_options
return 1
}
+# Helper function. Print the error message and set $died to 1
+function die()
+{
+ echo >&2 "error: $*"
+ died=1
+}
# Can be overrided with 'the option -n'
count=2
-### HELPER FUNCTIONS ##
-
-function die()
-{
- echo >&2 "error: $*"
- died=1
-}
-
# HELPER FOR NIT #
# Run standards benchs on a compiler command
echo " -n count: number of execution for each bar (default: $count)"
echo " --dry: Do not run the commands, just reuse the data and generate the graph"
echo " --fast: Run less and faster tests"
- echo " --html: Generate and HTML output"
echo " -h: this help"
}
-n) count="$2"; shift; shift;;
--dry) dry_run=true; shift;;
--fast) fast=true$fast; shift;;
- --html) html="index.html"; echo >"$html" "<html><head></head><body>"; shift;;
+ --html) shift;; # Deprecated
*) stop=true
esac
done
+html="index.html"
+echo >"$html" "<html><head></head><body>"
+
xml="bench_engines.xml"
echo "<testsuites><testsuite>" > "$xml"
for opt in "$@"; do
ot=${opt// /}
- prepare_res "$name$ot.dat" "$opt" "nitc-g with option $opt"
+ prepare_res "$name$ot.dat" "$opt" "nitc with option $opt"
run_compiler "nitc-$name" ./nitc $common $opt
done
if test -n "$2" -a -n "$withall"; then
- prepare_res "$name-all.dat" "all" "nitc-g with all options $@"
+ prepare_res "$name-all.dat" "all" "nitc with all options $@"
run_compiler "nitc-$name" ./nitc $common $@
fi
bench_nitc_options "slower" --global --hardening --no-shortcut-range
bench_nitc_options "nocheck" --global --no-check-null --no-check-autocast --no-check-attr-isset --no-check-covariance --no-check-assert
-bench_nitc_options "slower" --separate --hardening --no-shortcut-equal --no-union-attribute --no-shortcut-range --no-inline-intern "--no-gcc-directive likely --no-gcc-directive noreturn" "--no-tag-primitives"
+bench_nitc_options "slower" --separate --hardening --no-shortcut-equal --no-union-attribute --no-shortcut-range --no-inline-intern "--no-gcc-directive likely --no-gcc-directive noreturn" "--no-tag-primitives" "--colo-dead-methods" --type-poset
bench_nitc_options "nocheck" --separate --no-check-null --no-check-autocast --no-check-attr-isset --no-check-covariance --no-check-assert
bench_nitc_options "faster" --separate --skip-dead-methods --inline-coloring-numbers --inline-some-methods --direct-call-monomorph "--inline-some-methods --direct-call-monomorph"
bench_nitc_options "slower" --erasure --hardening --no-shortcut-equal --no-union-attribute --no-shortcut-range --no-inline-intern
-bench_nitc_options "nocheck" --erasure --no-check-null --no-check-autocast --no-check-attr-isset --no-check-covariance --no-check-assert --no-check-erasure-cast
+bench_nitc_options "nocheck" --erasure --no-check-null --no-check-autocast --no-check-attr-isset --no-check-covariance --no-check-assert --no-check-erasure-cast --no-check-all
bench_nitc_options "faster" --erasure --skip-dead-methods --inline-coloring-numbers --inline-some-methods --direct-call-monomorph --rta
bench_nitc_options "engine" "" NOALL "--separate" "--erasure" "--separate --semi-global" "--erasure --semi-global" "--erasure --semi-global --rta" "--global"
bench_nitc_options "policy" "" NOALL "--separate" "--erasure" "--separate --no-check-covariance" "--erasure --no-check-covariance --no-check-erasure-cast"
bench_nitc_options "nullables" "" "--no-check-attr-isset" "--no-union-attribute"
-bench_nitc_options "linkboost" "" NOALL --trampoline-call --colors-are-symbols "--colors-are-symbols --trampoline-call" "--separate --link-boost" "--separate --colors-are-symbols --guard-call" "--separate --colors-are-symbols --direct-call-monomorph0"
+bench_nitc_options "linkboost" "" NOALL --trampoline-call --colors-are-symbols "--colors-are-symbols --trampoline-call" "--separate --link-boost" "--separate --colors-are-symbols --guard-call" "--separate --colors-are-symbols --direct-call-monomorph0" "--substitute-monomorph"
bench_nitc_options "monomorph" "" --direct-call-monomorph0 --direct-call-monomorph
+bench_nitc_options "misc" "" --log --typing-test-metrics --invocation-metrics --isset-checks-metrics --tables-metrics --no-stacktrace --release --debug #FIXME add --sloppy
+
function bench_nitc-e_gc()
{
name="$FUNCNAME"
}
bench_compilation_time
-if test -n "$html"; then
- echo >>"$html" "</body></html>"
-fi
+echo >>"$html" "</body></html>"
echo >>"$xml" "</testsuite></testsuites>"
# Can be overrided with 'the option -n'
count=2
-### HELPER FUNCTIONS ##
-
-function die()
-{
- echo >&2 "error: $*"
- died=1
-}
-
## HANDLE OPTIONS ##
function usage()
# Can be overrided with 'the option -n'
count=3
-### HELPER FUNCTIONS ##
-
-function die()
-{
- echo >&2 "error: $*"
- died=1
-}
-
## HANDLE OPTIONS ##
function usage()
# Can be overrided with 'the option -n'
count=3
-### HELPER FUNCTIONS ##
-
-function die()
-{
- echo >&2 "error: $*"
- died=1
-}
-
## HANDLE OPTIONS ##
function usage()
echo gnuplot -e "set term png; set output \"$bn.png\"" "$1"
echo >>"$html" "<img src=\"$bn.png\"/>"
-else
+fi
+if test -n "$DISPLAY"; then
echo "# gnuplot -p $1"
gnuplot -p "$1"
fi
all:
./bench_markdown.sh all
+check:
+ ./bench_markdown.sh -s 1 nit
+
clean:
$(MAKE) clean -C benches
$(MAKE) clean -C engines
# Can be overrided with 'the option -n'
count=2
-### HELPER FUNCTIONS ##
-
-function die()
-{
- echo >&2 "error: $*"
- died=1
-}
+# Default number of times the input file is transformed during a single run
+s=200
## HANDLE OPTIONS ##
echo "run_bench: [options]* benchname"
echo " -v: verbose mode"
echo " -n count: number of execution for each bar (default: $count)"
+ echo " -s size: number of transformations for each run (default: $s)"
echo " --dry: Do not run the commands, just reuse the data and generate the graph"
echo " -h: this help"
}
-v) verbose=true; shift;;
-h) usage; exit;;
-n) count="$2"; shift; shift;;
+ -s) s="$2"; shift; shift;;
--dry) dry_run=true; shift;;
*) stop=true
esac
engdir="./engines"
bncdir="./benches/out"
mkdir -p $outdir
-
-s=200
+html="index.html"
+echo >"$html" "<html><head></head><body>"
function bench_nitmd()
{
plot $outdir/bench_markdown.gnu
fi
+echo >>"$html" "</body></html>"
+
if test -n "$died"; then
echo "Some commands failed"
exit 1
all:
$(MAKE) all -C nit
$(MAKE) all -C java
+
+check:
+ $(MAKE) check -C nit
contain_b:
./bench_polygon.sh contain
+
+check:
+ ./bench_polygon.sh -p 100 add_vertex
+ ./bench_polygon.sh -p 100 sort_vertices
+ ./bench_polygon.sh -p 100 intersection
+ ./bench_polygon.sh -p 100 convex_hull
+ ./bench_polygon.sh -p 100 convexity
+ ./bench_polygon.sh -p 100 contain
contain) shift; bench_contain $@;;
*) usage; exit;;
esac
+
+if test -n "$died"; then
+ echo "Some commands failed"
+ exit 1
+fi
+exit 0
index:
./bench_strings.sh index 10000000 50 25 200
+check: basic
+
basic:
./bench_strings.sh basic
echo " Trying variant $variant for benchmark $bench"
echo "---------------------------------------------------------"
git diff-index --quiet HEAD || {
- echo "Cannot run benches on a dirty working directory."
- echo "Please commit or stash your modifications and relaunch the command."
- exit 1
+ die "Cannot run benches on a dirty working directory."
+ die "Please commit or stash your modifications and relaunch the command."
+ return
}
git am $curr_rev || {
- echo "Error when applying patch $curr_rev"
- git am --abort;
- exit 1;
+ die "Error when applying patch $curr_rev"
+ git am --abort
+ return
}
if [ "$need_bootstrap" = true ]; then
prepare_compiler
bench=$1
shift;
- git diff-index --quiet HEAD || {
- echo "Cannot run benches on a dirty working directory."
- echo "Please commit or stash your modifications and relaunch the command."
- exit 1
- }
-
head=`git rev-parse HEAD`
variant="HEAD"
need_plot=true
}
main "$@";
+
+if test -n "$died"; then
+ echo "Some commands failed"
+ exit 1
+fi
+exit 0
+
+SVG2ICONS=../inkscape_tools/bin/svg_to_icons
+SVG2PNG=../inkscape_tools/bin/svg_to_png_and_nit
+
default: bin/moles
bin/moles: $(shell ../../bin/nitls -M src/moles_linux.nit) assets/images/drawing.png
mkdir -p bin
../../bin/nitc -o bin/moles.apk src/moles_android.nit --release
-../inkscape_tools/bin/svg_to_icons:
+$(SVG2ICONS):
$(MAKE) -C ../inkscape_tools
-android-icons: ../../contrib/inkscape_tools/bin/svg_to_icons art/icon.svg
+android-icons: $(SVG2ICONS) art/icon.svg
mkdir -p res
- ../inkscape_tools/bin/svg_to_icons art/icon.svg --android --out res/
+ $(SVG2ICONS) art/icon.svg --android --out res/
android-install: bin/moles.apk
adb install -rf bin/moles.apk
-assets/images/drawing.png: art/drawing.svg ../../contrib/inkscape_tools/bin/svg_to_icons
+assets/images/drawing.png: art/drawing.svg $(SVG2ICONS)
mkdir -p assets/images
- ../inkscape_tools/bin/svg_to_png_and_nit --src src/ --scale 2.0 art/drawing.svg
+ $(SVG2PNG) --src src/ --scale 2.0 art/drawing.svg
check-android: bin/moles.apk
../../misc/jenkins/check_android.sh bin/moles.apk
import solver
import mnit::tileset
import app::data_store
-import md5
intrude import grid
intrude import level
self.over = self.level.fullname
if self.level.get_state >= l.l_won then
- if game.levels[9].get_state >= l.l_won then self.over += " --- {self.level.score}/{self.level.par}"
+ if game.levels[9].get_state >= l.l_won then self.over += " --- {self.level.score}/{self.level.gold}"
else if self.level.get_state >= l.l_open then
- if game.levels[9].get_state >= l.l_open then self.over += " --- ?/{self.level.par}"
+ if game.levels[9].get_state >= l.l_open then self.over += " --- ?/{self.level.gold}"
end
- #self.enabled = l.get_state >= l.l_open
+ self.enabled = l.get_state >= l.l_open or game.cheated
end
redef fun draw(ctx)
end
ctx.blit(game.img[ix,iy], self.x, self.y)
- if s == l.l_par then
+ if s == l.l_gold then
ctx.blit(game.img2[7,0], self.x + bw*5/8, self.y-bh*1/8)
end
ctx.textx(self.level.name, self.x+5, self.y+5, 24, null, null)
end
if game.levels[9].get_state >= level.l_won then
if level.is_challenge then
- ctx.textx("GOAL: {level.par}",self.x,self.y+44,21,"yellow",null)
+ ctx.textx("GOAL: {level.gold}",self.x,self.y+44,21,"yellow",null)
else
- ctx.textx("PAR: {level.par}",self.x,self.y+44,21,"yellow",null)
+ ctx.textx("GOLD: {level.gold}",self.x,self.y+44,21,"yellow",null)
end
end
end
do
print "***STATUS** {txt}"
self.tmp_txt = txt
- self.tmp_txt_ttl = 20
+ self.tmp_txt_ttl = 60
self.tmp_txt_color = color
end
# Font
var font = new TileSetFont(app.load_image("deltaforce_font.png"), 16, 17, "ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789.:;!?\"'() -,/")
- var xxx = """
- fun save_cookie(name, val:String) do
- var days = 365
- var date = new Date()
- date.setTime(date.getTime()+(days*24*60*60*1000))
- document.cookie = name+"="+val+"; expires="+date.toGMTString()+"; path=/"
- end
-
- fun read_cookie(name:String):String do
- var key = name + "="
- var ca = document.cookie.split(';')
- for(var i=0; i<ca.length; i++) do
- var c = ca[i]
- while (c[0]==' ') c = c.substring(1, c.length)
- if (c.indexOf(key) == 0) return c.substring(key.length)
- end
- return null
- end
- """
-
# DISPLAY *****************************************************************
# Is the game in editing mode
# SOUND
# Is the music muted?
- var music_muted: Bool = false #read_cookie("music_muted")
+ var music_muted: Bool = app.data_store["music_muted"] == true
# Is the sound effects muted?
- var sfx_muted: Bool = false #read_cookie("sfx_muted")
+ var sfx_muted: Bool = app.data_store["sfx_muted"] == true
# The background music resource. */
var music = new Music("music.ogg")
# ResizeButton
var button_size = new ResizeButton(self)
+ # Cheat mode enabled?
+ var cheated = false
+
init
do
- load_levels
init_buttons
entities.clear
title
+
+ if not music_muted then music.play
end
# fill `buttons`
# Play a level in player mode.
fun play(l: Level)
do
+ save # save the previous level grid
level = l
- grid.load(level.str)
+ grid.load(level.saved_str or else level.str)
init_play_menu(false)
if level.status != "" then
statusbar.main_txt = level.status
# Helper function to initialize the menu (and tile) screen
fun init_menu
do
+ save # save the previous level grid
init_game
level = null
var i = levels.first
end
t = new Achievement(self, 0, "Training")
entities.push(t)
- t = new Achievement(self, 1, "Par")
+ t = new Achievement(self, 1, "Gold")
entities.push(t)
t = new Achievement(self, 2, "Editor")
entities.push(t)
fun onKeyDown(ev: Event) do
var kc = ev.char_code
if kc == "e" then
+ set_tmp("RUN EDITOR")
grid_edit = grid.copy(true)
edit_grid(grid)
+ else if kc == "c" then
+ if cheated then
+ set_tmp("CHEAT: OFF")
+ snd_duh.play
+ cheated = false
+ else
+ set_tmp("CHEAT: ON")
+ snd_win.play
+ cheated = true
+ end
else if kc == "s" then
if solver == null then
solver = (new FriendzProblem(grid)).solve
else
solver_pause = not solver_pause
end
+ if solver_pause then
+ set_tmp("SOLVER: PAUSED")
+ else
+ set_tmp("SOLVER: ON")
+ end
#solver.step
else if kc == "d" then
if solver == null then
solver = (new FriendzProblem(grid)).solve
solver_pause = true
+ set_tmp("SOLVER: ON")
else
+ solver_pause = true
solver.run_steps(1)
+ set_tmp("SOLVER: ONE STEP")
end
else if kc == "+" then
solver_steps += 100
- print solver_steps
+ set_tmp("SOLVER: {solver_steps} STEPS")
else if kc == "-" then
solver_steps -= 100
- print solver_steps
+ set_tmp("SOLVER: {solver_steps} STEPS")
else for g in entities do
if kc == g.shortcut then
g.click(ev)
end
end
+ fun set_tmp(s: String)
+ do
+ statusbar.set_tmp(s, "cyan")
+ end
+
redef fun load_levels
do
super
for level in levels do
- var score = app.data_store["s{level.str.md5}"]
+ var score = app.data_store["s{level.str}"]
if score isa Int then
level.score = score
end
+ var saved_str = app.data_store["g{level.str}"]
+ if saved_str isa String then
+ print "LOAD {level.name}: {saved_str}"
+ level.saved_str = saved_str
+ end
+ end
+ end
+
+ fun save
+ do
+ var l = level
+ if l != null then
+ l.save
end
end
end
init(game: Game)
do
super(game, "MUSIC", 470, 412, "purple", "Mute the music", "Unmute the music")
+ toggled = game.music_muted
end
redef fun click2(ev)
do
game.music_muted = self.toggled
if game.music_muted then game.music.pause else game.music.play
- #game.save_cookie("music_muted",music_muted?"true":"")
+ app.data_store["music_muted"] = game.music_muted
end
end
init(game: Game)
do
super(game, "SOUND FX", 470, 382, "purple", "Mute the sound effects", "Unmute the sound effects")
+ toggled = game.sfx_muted
end
redef fun click2(ev)
do
game.sfx_muted = self.toggled
if not game.sfx_muted then game.snd_whip.play # Because the automatic one was muted
- #save_cookie("sfx_muted",sfx_muted?"true":"")
+ app.data_store["sfx_muted"] = game.sfx_muted
end
end
# img loading?
end
+ redef fun on_pause
+ do
+ super
+ game.save
+ end
+
# Maximum wanted frame per second
var max_fps = 30
end
redef class Level
- redef fun save
+ # Save the score and grid of the level
+ fun save
do
- app.data_store["s{str.md5}"] = if score > 0 then score else null
+ app.data_store["s{str}"] = if score > 0 then score else null
+ var saved = game.grid.save
+ saved_str = saved
+ app.data_store["g{str}"] = saved
+ print "SAVE: {name}: {saved}"
end
+
+ # The saved player grid (to continue games)
+ var saved_str: nullable String = null
end
fun save: String
do
var res = ""
- var str = ".#ABCDEFGHI"
+ var str = ".abcdefghi#ABCDEFGHI"
for y in [0..height[ do
var rle = 0
var last: nullable Int = null
for x in [0..width[ do
var t = self.grid[x][y]
- var tk = 0
- if t.fixed then tk = t.kind + 1
+ var tk = t.kind
+ if t.fixed then tk += 10
if tk == last and rle<9 then
rle += 1
else
x += 1
else if c == '#' then
var t = self.get(x,y)
+ assert t != null
t.fixed = true
x += 1
else if c >= 'A' and c <= 'I' then
t.update(c.ascii-'A'.ascii+1)
t.fixed = true
x += 1
+ else if c >= 'a' and c <= 'i' then
+ var t = self.get(x,y)
+ assert t != null
+ t.update(c.ascii-'a'.ascii+1)
+ x += 1
else if c >= '1' and c <= '9' then
rle = c.to_i
else
if x>0 then y += 1
if x > mx then mx = x
if y > my then my = y
- if mx<3 or my<3 or mx>=max_width or my>=max_height then
+ if mx<3 or my<3 or mx>max_width or my>max_height then
return false
end
self.resize(mx,my)
var ls = code.split(";")
self.number = i
self.str = ls[0]
- self.par = ls[1].to_i
+ self.gold = ls[1].to_i
if ls.length >= 3 then
self.status = ls[2]
end
# initial grid position
var str: String
- # top score
- var par: Int
+ # top score to get gold
+ var gold: Int
# Help message if any
var status: String = ""
var l_disabled = 1
var l_open = 2
var l_won = 3
- var l_par = 4
+ var l_gold = 4
fun get_state: Int
do
if self.score == 0 then
if self.number == 0 or game.levels[self.number-1].score > 0 then return l_open
if self.number == 25 and game.levels[19].score > 0 then return l_open else return l_disabled
- else if self.score < self.par or not game.levels[9].score > 0 then
+ else if self.score < self.gold or not game.levels[9].score > 0 then
return l_won
- else return l_par
+ else return l_gold
end
# Returns true if g is a wining condition for the level.
fun check_won(g: Grid): Bool
do
- var w = g.won and (not self.is_challenge or g.number >= self.par)
+ var w = g.won and (not self.is_challenge or g.number >= self.gold)
if not w then return false
if g.number > self.score then
self.score = g.number
- self.save
end
return true
end
-
- # Save the score of the level
- fun save do end
end
# main game object
--- /dev/null
+Categories:Nit
+License:Apache2
+Web Site:http://nitlanguage.org
+Source Code:http://nitlanguage.org/nit.git/tree/HEAD:/contrib/mnit_test
+Issue Tracker:https://github.com/nitlang/nit/issues
+
+Summary:Minimal Demo for MNit
+Description:
+A useless application that test various basic API usage of the mnit framework on Android.
+.
--- /dev/null
+Categories:Nit,Games
+License:Apache2
+Web Site:http://nitlanguage.org
+Source Code:http://nitlanguage.org/nit.git/tree/HEAD:/contrib/tinks
+Issue Tracker:https://github.com/nitlang/nit/issues
+
+Summary:Multiplayer crossplatform action game with destructible procedurally generated worlds
+Description:
+Each player controls a tank, opens fire from the turret and navigates between the terrain features.
+Explosions from turret fire and tank destruction have different forces and destroy the terrain.
+Each tank needs 4 hits to be destroyed.
+Destroyed tanks drop health power-ups which can repair other tanks.
+.
NITC=../../bin/nitc
NITLS=../../bin/nitls
-all: bin/calculator bin/calculator.apk bin/test
+all: bin/calculator bin/test
bin/calculator: $(shell ${NITLS} -M src/calculator.nit -m linux) ${NITC}
mkdir -p bin
${NITC} -o $@ src/calculator.nit -m linux
-bin/calculator.apk: $(shell ${NITLS} -M src/calculator.nit -m android) ${NITC} ../../contrib/inkscape_tools/bin/svg_to_icons
- mkdir -p bin res
- ../../contrib/inkscape_tools/bin/svg_to_icons art/icon.svg --android --out res/
+android: bin/calculator.apk
+
+bin/calculator.apk: $(shell ${NITLS} -M src/calculator.nit -m android) ${NITC} res/drawable-ldpi/icon.png
+ mkdir -p bin
${NITC} -o $@ src/calculator.nit -m ../../lib/android/ui/ -D debug
+android-release: $(shell ${NITLS} -M src/calculator.nit -m android) ${NITC} res/drawable-ldpi/icon.png
+ mkdir -p bin
+ ${NITC} -o bin/calculator.apk src/calculator.nit -m ../../lib/android/ui/ --release
+
+res/drawable-ldpi/icon.png: art/icon.svg ../../contrib/inkscape_tools/bin/svg_to_icons
+ mkdir -p res
+ ../../contrib/inkscape_tools/bin/svg_to_icons art/icon.svg --android --out res/
+
../../contrib/inkscape_tools/bin/svg_to_icons:
make -C ../../contrib/inkscape_tools/
--- /dev/null
+Categories:Nit
+License:Apache2
+Web Site:http://nitlanguage.org
+Source Code:http://nitlanguage.org/nit.git/tree/HEAD:/examples/calculator
+Issue Tracker:https://github.com/nitlang/nit/issues
+
+Summary:A Basic Calculator
+Description:
+10 digits, 4 operations, hours of fun.
+
+This is the official example of a portable GUI application built using app.nit.
+.
# Load a sound for a given resource id
fun load_sound(id: Int, context: NativeActivity): Music do
+ # FIXME: maybe find a better way to handle this situation
+ # If two different music are loaded with the same `MediaPlayer`,
+ # a new `NativeMediaPlayer` will be created for the secondd music
+ # and the nit program will loose the handle to the previous one
+ # If the previous music is playing, we need to stop it
+ if playing then
+ stop
+ reset
+ destroy
+ end
self.nmedia_player = self.nmedia_player.create(context, id)
if self.nmedia_player.is_java_null then
self.error = new Error("Failed to load a sound")
end
redef class PlayableAudio
+ # Flag to know if the user paused the sound
+ # Used when the app pause all sounds or resume all sounds
+ var paused: Bool = false
+
redef init do add_to_sounds(self)
end
redef fun pause do
if self.error != null or not self.is_loaded then return
soundpool.pause_stream(soundpool_id)
+ paused = true
end
redef fun resume do
if self.error != null or not self.is_loaded then return
soundpool.resume(soundpool_id)
+ paused = false
end
end
redef fun pause do
if self.error != null or not self.is_loaded then return
media_player.pause
+ paused = true
end
redef fun resume do
if self.error != null or not self.is_loaded then return
play
+ paused = false
end
end
redef fun on_pause do
super
- for s in sounds do s.pause
+ for s in sounds do
+ # Pausing sounds that are not already paused by user
+ # `s.paused` is set to false because `pause` set it to true
+ # and we want to know which sound has been paused by the user
+ # and which one has been paused by the app
+ if not s.paused then
+ s.pause
+ s.paused = false
+ end
+ end
audio_manager.abandon_audio_focus
end
redef fun on_resume do
super
audio_manager.request_audio_focus
- for s in sounds do s.resume
+ for s in sounds do
+ # Resumes only the sounds paused by the App
+ if not s.paused then s.resume
+ end
end
end
for p in $projects; do
dir=`dirname "$p"`
name=`basename "$dir"`
- echo "*** make $dir ***"
- if misc/jenkins/unitrun.sh "cmd-$name-make" make -C "$dir"; then
- # Make OK. Check additional rules if they exists
- for rule in $rules; do
- make -C "$dir" $rule -n 2>/dev/null ||
- continue
- echo "*** make$rule $dir ***"
- misc/jenkins/unitrun.sh "cmd-$name-make$rule" make -C "$dir" $rule ||
- failed="$failed $name-$rule"
- done
- else
- failed="$failed $name"
- fi
+ echo "### in $dir ###"
+ # Check each rules, if they exists
+ for rule in $rules; do
+ make -C "$dir" $rule -n >/dev/null 2>/dev/null || {
+ # Special case for `all` that falls back as the default target
+ if [ "$rule" = "all" ]; then
+ echo "*** make -C $dir ***"
+ misc/jenkins/unitrun.sh "cmd-$name-make" make -C "$dir" ||
+ failed="$failed $name"
+ fi
+ continue
+ }
+ echo "*** make $rule -C $dir ***"
+ misc/jenkins/unitrun.sh "cmd-$name-make$rule" make -C "$dir" $rule ||
+ failed="$failed $name-$rule"
+ done
done
grep '<error message' *-make*.xml
if test -n "$failed"; then