summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@googlemail.com>2013-11-06 18:22:50 +0100
committerlassulus <lassulus@googlemail.com>2013-11-06 18:22:50 +0100
commitb8035a82c362d24c2adf464a1c99fcc098b743c4 (patch)
tree039ebc8342f5889ba2344df74e7fd0bc65792bfb
parent401ca308d6f1c501788729433a9e3c58ddfab590 (diff)
parent1afa7f72d3eae517b3eb742228931694910a087a (diff)
Merge branch 'master' of github.com:krebscode/painload
-rw-r--r--.gitignore2
-rwxr-xr-x.graveyard/ship/deploy9
-rw-r--r--.graveyard/ship/develop (renamed from ship/develop)0
-rw-r--r--ship/Makefile32
-rw-r--r--ship/README1
-rw-r--r--ship/README.markdown20
-rwxr-xr-xship/deploy9
-rwxr-xr-xship/src/punani (renamed from ship/bin/punani)0
-rw-r--r--ship/tmp/.placeholder (renamed from ship/out/.placeholder)0
9 files changed, 62 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore
index 4ccc216f..e2b93f24 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,6 +28,6 @@ a.out
/ovh/soapi/SOAPpy
/Reaktor/IRC/irclib.py
/Reaktor/public_commands/*
-/ship/out
+/ship/tmp
/webchat/node_modules
/webchat/local_config
diff --git a/.graveyard/ship/deploy b/.graveyard/ship/deploy
new file mode 100755
index 00000000..cb71d570
--- /dev/null
+++ b/.graveyard/ship/deploy
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -xeuf
+cd $(dirname $0)
+exesrcdir=src
+libsrcdir=lib
+tmpoutdir=tmp
+for file in `ls $exesrcdir`; do
+ BUILD_PATH=$libsrcdir ./build compile $exesrcdir/$file $tmpoutdir/$file
+done
diff --git a/ship/develop b/.graveyard/ship/develop
index a961f9c2..a961f9c2 100644
--- a/ship/develop
+++ b/.graveyard/ship/develop
diff --git a/ship/Makefile b/ship/Makefile
new file mode 100644
index 00000000..0e9b8edf
--- /dev/null
+++ b/ship/Makefile
@@ -0,0 +1,32 @@
+exesrcdir := src
+libsrcdir := lib
+tmpoutdir := tmp
+finoutdir := ../bin
+
+exesrcs := $(notdir $(wildcard $(exesrcdir)/*))
+exetmpouts := $(addprefix $(tmpoutdir)/,$(exesrcs))
+exefinouts := $(addprefix $(finoutdir)/,$(exesrcs))
+
+build := BUILD_PATH=$(libsrcdir) ./build
+
+.PHONY: all install clean distclean
+
+all: $(exetmpouts)
+
+install: $(exefinouts)
+
+clean:
+ rm -f $(exetmpouts)
+
+distclean: clean
+ rm -f $(exefinouts)
+
+define buildrule
+$(tmpoutdir)/$(1): $(exesrcdir)/$(1) $(shell $(build) deps $(exesrcdir)/$(1))
+ $(build) compile $$< $$@
+endef
+
+$(foreach exe, $(exesrcs), $(eval $(call buildrule,$(exe))))
+
+$(finoutdir)/%: $(tmpoutdir)/%
+ cp $< $@
diff --git a/ship/README b/ship/README
deleted file mode 100644
index b824b503..00000000
--- a/ship/README
+++ /dev/null
@@ -1 +0,0 @@
-# ship - shellscript installation processor
diff --git a/ship/README.markdown b/ship/README.markdown
new file mode 100644
index 00000000..2882f732
--- /dev/null
+++ b/ship/README.markdown
@@ -0,0 +1,20 @@
+# ship - shellscript installation processor
+
+
+## Make Interface
+
+ Build all executables from `src/` into `tmp/`:
+
+ make [all]
+
+ Build all executables into `tmp/` and `//bin/`:
+
+ make install
+
+ Undo `make [all]`:
+
+ make clean
+
+ Undo `make install`:
+
+ make distclean
diff --git a/ship/deploy b/ship/deploy
deleted file mode 100755
index 411f8eec..00000000
--- a/ship/deploy
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-set -xeuf
-cd $(dirname $0)
-bindir=$PWD/bin
-libdir=$PWD/lib
-outdir=$PWD/out
-for file in `ls -1 $bindir`;do
- BUILD_PATH=$libdir ./build compile $bindir/$file $outdir/$file
-done
diff --git a/ship/bin/punani b/ship/src/punani
index ceabd667..ceabd667 100755
--- a/ship/bin/punani
+++ b/ship/src/punani
diff --git a/ship/out/.placeholder b/ship/tmp/.placeholder
index e69de29b..e69de29b 100644
--- a/ship/out/.placeholder
+++ b/ship/tmp/.placeholder