#SHELL=bash -xe include ./var/config.mk all: @for bundle in $$(find ./src/js/bundle -name '*.jsh') ; do \ echo "Building bundle $$bundle" ;\ file=$$(basename "$$bundle") ; \ js=$${file%.jsh}.js ; \ output=build/js/$$js; \ $(PROG_INSTALL) -d build/js && \ $(PROG_CPP) -I./src/js/include -P -nostdinc -x c -o - "$$bundle" \ | sed -n '/./p' > "$$output" && \ echo "Wrote output on $$output" && \ $(PROG_JSL) -process "$$output" && \ if [ $$? -eq 3 ] ; then exit 1 ; fi ; \ echo "Test successful." \ || exit 1 ; \ done distclean: -rm -rf var build