aboutsummaryrefslogtreecommitdiff
path: root/init.d.misc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'init.d.misc/Makefile')
-rw-r--r--init.d.misc/Makefile28
1 files changed, 24 insertions, 4 deletions
diff --git a/init.d.misc/Makefile b/init.d.misc/Makefile
index c50e550a..693f9134 100644
--- a/init.d.misc/Makefile
+++ b/init.d.misc/Makefile
@@ -1,5 +1,25 @@
-DIR = /etc/init.d
-BIN = $(CONTENTS)
+DIR= /etc/init.d
+_SRCS!= ls *.in
+SRCS?= ${_SRCS}$(shell ls *.in)
+OBJS= ${SRCS:.in=}
-TOPDIR = ..
-include $(TOPDIR)/default.mk
+MK= ../mk
+include ${MK}/os.mk
+include Makefile.${OS}
+
+VARBASE?= /var
+
+.SUFFIXES: .in
+
+all: ${OBJS}
+
+.in:
+ sed -e s':@PREFIX@:${PREFIX}:' -e 's:@VARBASE@:${VARBASE}:' $< > $@
+
+install: all
+ for x in ${OBJS}; do \
+ ${INSTALL} work/$$x ${DESTDIR}${DIR}; \
+ done
+
+clean:
+ rm -f ${OBJS}