This allows building minilogd without installing the whole works, and is just a bit more suited to the task. Signed-off-by: Dan McGee <dan@archlinux.org> --- Makefile | 24 ++++++++++++++++++++++++ install.sh | 23 ----------------------- 2 files changed, 24 insertions(+), 23 deletions(-) create mode 100644 Makefile delete mode 100755 install.sh diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4b330f6 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +INSTALL = install -c -D +GEN = minilogd + +all: $(GEN) + +install: all + $(INSTALL) -m644 inittab $(DESTDIR)$(prefix)/etc/inittab + $(INSTALL) -m644 rc.conf $(DESTDIR)$(prefix)/etc/rc.conf + $(INSTALL) -m644 functions $(DESTDIR)$(prefix)/etc/rc.d/functions + $(INSTALL) -m755 rc.local $(DESTDIR)$(prefix)/etc/rc.local + $(INSTALL) -m755 rc.local.shutdown $(DESTDIR)$(prefix)/etc/rc.local.shutdown + $(INSTALL) -m755 rc.multi $(DESTDIR)$(prefix)/etc/rc.multi + $(INSTALL) -m755 rc.shutdown $(DESTDIR)$(prefix)/etc/rc.shutdown + $(INSTALL) -m755 rc.single $(DESTDIR)$(prefix)/etc/rc.single + $(INSTALL) -m755 rc.sysinit $(DESTDIR)$(prefix)/etc/rc.sysinit + $(INSTALL) -m755 network $(DESTDIR)$(prefix)/etc/rc.d/network + $(INSTALL) -m755 netfs $(DESTDIR)$(prefix)/etc/rc.d/netfs + $(INSTALL) -m755 adjtime.cron $(DESTDIR)$(prefix)/etc/cron.hourly/adjtime + $(INSTALL) -m755 minilogd $(DESTDIR)$(prefix)/sbin/minilogd + +clean: + rm -f $(GEN) + +.PHONY: all install diff --git a/install.sh b/install.sh deleted file mode 100755 index 2b2cbbc..0000000 --- a/install.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -install -d -m755 ${DESTDIR}/etc/rc.d || exit 1 -install -d -m755 ${DESTDIR}/etc/conf.d || exit 1 -install -d -m755 ${DESTDIR}/etc/rc.d/functions.d/ || exit 1 -install -d -m755 ${DESTDIR}/etc/cron.hourly/ || exit 1 - -for i in inittab rc.conf; do - install -D -m644 $i ${DESTDIR}/etc/$i || exit 1 -done -for i in rc.local rc.local.shutdown rc.multi rc.shutdown rc.single rc.sysinit; do - install -D -m755 $i ${DESTDIR}/etc/$i || exit 1 -done - -install -D -m755 adjtime.cron ${DESTDIR}/etc/cron.hourly/adjtime - -install -D -m644 functions ${DESTDIR}/etc/rc.d/functions || exit 1 -for i in network netfs; do - install -D -m755 $i ${DESTDIR}/etc/rc.d/$i || exit 1 -done - -gcc $CFLAGS -o minilogd minilogd.c || exit 1 -install -D -m755 minilogd ${DESTDIR}/sbin/minilogd || exit 1 -- 1.6.4