-compile-parser:
- ../../contrib/nitcc/src/nitcc ../../contrib/nitcc/examples/json.sablecc
+NITCCDIR=../../contrib/nitcc/
+
+compile-parser: $(NITCCDIR)src/nitcc
+ $(NITCCDIR)src/nitcc $(NITCCDIR)examples/json.sablecc
+
+$(NITCCDIR)src/nitcc:
+ make -C $(NITCCDIR)
# See the License for the specific language governing permissions and
# limitations under the License.
-# Check the build and the execution of software in examples/ and contrib/
+# Check the build and the execution of software in lib/, examples/ and contrib/
# The script must be run from the root Nit directory.
#
# various .xml junit file will be generated in the root directory for jenkins.
+#
+# Arguments will be additional `make` rules to execute. eg.
+#
+# check_contrib.sh check android
-projects=`echo examples/*/Makefile contrib/*/Makefile`
+projects=`echo lib/*/Makefile examples/*/Makefile contrib/*/Makefile`
+rules=$*
failed=
for p in $projects; do
name=`basename "$dir"`
echo "*** make $dir ***"
if misc/jenkins/unitrun.sh "cmd-$name-make" make -C "$dir"; then
- # Make OK, is there a `check` rule?
- make -C "$dir" check -n 2>/dev/null || continue
- echo "*** makecheck $dir ***"
- if misc/jenkins/unitrun.sh "cmd-$name-makecheck" make -C "$dir" check; then
- :
- else
- failed="$failed $name-check"
- fi
-
+ # 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
done
-grep '<error message' *-make.xml *-makecheck.xml
+grep '<error message' *-make*.xml
if test -n "$failed"; then
echo "FAILED: $failed"
exit 1