OSDN Git Service

initial version
authorNagao Takeyuki <nagaotakeyuki@gmail.com>
Sat, 12 Sep 2009 11:29:29 +0000 (20:29 +0900)
committerNagao Takeyuki <nagaotakeyuki@gmail.com>
Sat, 12 Sep 2009 11:29:29 +0000 (20:29 +0900)
Signed-off-by: Nagao Takeyuki <nagaotakeyuki@gmail.com>
Makefile [new file with mode: 0644]
configure [new file with mode: 0755]
src/js/bundle/jdisp.jsh [new file with mode: 0644]
src/js/include/jdisp/package.jsh [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..73833c7
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,18 @@
+#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
diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..904c2c5
--- /dev/null
+++ b/configure
@@ -0,0 +1,16 @@
+#!/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"
diff --git a/src/js/bundle/jdisp.jsh b/src/js/bundle/jdisp.jsh
new file mode 100644 (file)
index 0000000..4ad7ce4
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _JDISP_H
+#define _JDISP_H
+
+#include <jdisp/package.jsh>
+
+#endif /* _JDISP_H */
diff --git a/src/js/include/jdisp/package.jsh b/src/js/include/jdisp/package.jsh
new file mode 100644 (file)
index 0000000..e69de29