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