Signed-off-by: Nagao Takeyuki <nagaotakeyuki@gmail.com>
--- /dev/null
+#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 $$bundle - \
+ | sed -n '/./p' > $$output && \
+ echo "Wrote output on $$output" \
+ || exit 1 ; \
+ done
+
+distclean:
+ -rm -rf var build
--- /dev/null
+#!/bin/sh
+
+CONFIG_FILE=./var/config.mk
+
+install -d -m 0755 var
+if [ ! -f "$CONFIG_FILE" ] ; then
+ cat > "$CONFIG_FILE" <<EOS
+PROG_CPP=cpp
+PROG_INSTALL=install
+EOS
+else
+ echo >&2 "warning: config file $CONFIG_FILE already exists. Not overwriting."
+fi
+
+echo "Current configuration:"
+cat "$CONFIG_FILE"
--- /dev/null
+#ifndef _JDISP_H
+#define _JDISP_H
+
+#include <jdisp/package.jsh>
+
+#endif /* _JDISP_H */