From 2ad3bb39e58f594ea1299a2b4ed36ee3f63e49d4 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 6 Nov 2013 17:27:07 +0100 Subject: ship: mv bin src && mv out tmp --- ship/bin/punani | 4 ---- ship/deploy | 10 +++++----- ship/out/.placeholder | 0 ship/src/punani | 4 ++++ ship/tmp/.placeholder | 0 5 files changed, 9 insertions(+), 9 deletions(-) delete mode 100755 ship/bin/punani delete mode 100644 ship/out/.placeholder create mode 100755 ship/src/punani create mode 100644 ship/tmp/.placeholder (limited to 'ship') diff --git a/ship/bin/punani b/ship/bin/punani deleted file mode 100755 index ceabd667..00000000 --- a/ship/bin/punani +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/sh -#@info -#@include punani -punani "$@" diff --git a/ship/deploy b/ship/deploy index 411f8eec..cb71d570 100755 --- a/ship/deploy +++ b/ship/deploy @@ -1,9 +1,9 @@ #!/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 +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/out/.placeholder b/ship/out/.placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/ship/src/punani b/ship/src/punani new file mode 100755 index 00000000..ceabd667 --- /dev/null +++ b/ship/src/punani @@ -0,0 +1,4 @@ +#! /bin/sh +#@info +#@include punani +punani "$@" diff --git a/ship/tmp/.placeholder b/ship/tmp/.placeholder new file mode 100644 index 00000000..e69de29b -- cgit v1.2.3 From abc1cda02e3968c8cf19c0fc4cfaf00ed976983f Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 6 Nov 2013 17:29:40 +0100 Subject: ship develop: RIP --- ship/develop | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 ship/develop (limited to 'ship') diff --git a/ship/develop b/ship/develop deleted file mode 100644 index a961f9c2..00000000 --- a/ship/develop +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -source_all(){ - LIBDIR=${1:-.} - for i in $LIBDIR/*; do . "$i"; done -} -- cgit v1.2.3 From 38255554031cc8d0a52bd9e1731a0a873b3349c7 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 6 Nov 2013 17:31:48 +0100 Subject: ship: s/deploy/make {,inst}all {,dist}clean/ --- ship/Makefile | 32 ++++++++++++++++++++++++++++++++ ship/deploy | 9 --------- 2 files changed, 32 insertions(+), 9 deletions(-) create mode 100644 ship/Makefile delete mode 100755 ship/deploy (limited to 'ship') 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/deploy b/ship/deploy deleted file mode 100755 index cb71d570..00000000 --- a/ship/deploy +++ /dev/null @@ -1,9 +0,0 @@ -#!/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 -- cgit v1.2.3 From e1cc2aa4d5fe2f3c9f1e60a500ba55e77bd57ea9 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 6 Nov 2013 17:44:48 +0100 Subject: ship README: talk about make interface --- ship/README | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'ship') diff --git a/ship/README b/ship/README index b824b503..2882f732 100644 --- a/ship/README +++ b/ship/README @@ -1 +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 -- cgit v1.2.3 From 1afa7f72d3eae517b3eb742228931694910a087a Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 6 Nov 2013 17:49:04 +0100 Subject: ship: mv README{,.markdown} --- ship/README | 20 -------------------- ship/README.markdown | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 20 deletions(-) delete mode 100644 ship/README create mode 100644 ship/README.markdown (limited to 'ship') diff --git a/ship/README b/ship/README deleted file mode 100644 index 2882f732..00000000 --- a/ship/README +++ /dev/null @@ -1,20 +0,0 @@ -# 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/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 -- cgit v1.2.3