2008-01-07 09:39:44 +00:00
|
|
|
PROG= rc
|
2008-03-16 17:00:56 +00:00
|
|
|
SRCS= checkpath.c fstabinfo.c mountinfo.c start-stop-daemon.c \
|
2008-01-14 14:24:20 +00:00
|
|
|
rc-applets.c rc-depend.c rc-logger.c \
|
2008-03-21 09:10:59 +00:00
|
|
|
rc-misc.c rc-plugin.c rc-service.c rc-status.c rc-update.c \
|
2008-03-16 17:00:56 +00:00
|
|
|
runscript.c rc.c
|
2008-01-05 20:49:48 +00:00
|
|
|
|
2008-01-07 09:39:44 +00:00
|
|
|
CLEANFILES= version.h
|
2008-01-05 20:49:48 +00:00
|
|
|
|
2008-02-28 11:08:49 +00:00
|
|
|
BINDIR= ${PREFIX}/bin
|
|
|
|
SBINDIR= ${PREFIX}/sbin
|
|
|
|
LINKDIR= ${PREFIX}/${LIBNAME}/${PROG}
|
2008-01-05 20:49:48 +00:00
|
|
|
|
2008-01-07 09:39:44 +00:00
|
|
|
BINLINKS= rc-status
|
2008-03-19 17:11:50 +00:00
|
|
|
SBINLINKS= rc-service rc-update runscript start-stop-daemon
|
2008-01-05 20:49:48 +00:00
|
|
|
RC_BINLINKS= einfon einfo ewarnn ewarn eerrorn eerror ebegin eend ewend \
|
2008-06-03 11:57:15 +00:00
|
|
|
eindent eoutdent esyslog eval_ecolors ewaitfile \
|
2008-01-07 09:39:44 +00:00
|
|
|
veinfo vewarn vebegin veend vewend veindent veoutdent \
|
|
|
|
service_starting service_started \
|
|
|
|
service_stopping service_stopped \
|
|
|
|
service_inactive service_wasinactive \
|
2008-10-30 14:59:14 +00:00
|
|
|
service_hotplugged service_started_daemon \
|
2008-01-07 09:39:44 +00:00
|
|
|
checkpath fstabinfo mountinfo rc-depend \
|
|
|
|
service_get_value service_set_value get_options save_options \
|
2008-01-14 08:12:37 +00:00
|
|
|
shell_var is_newer_than is_older_than
|
2008-01-05 20:49:48 +00:00
|
|
|
RC_SBINLINKS= mark_service_starting mark_service_started \
|
2008-01-07 09:39:44 +00:00
|
|
|
mark_service_stopping mark_service_stopped \
|
|
|
|
mark_service_inactive mark_service_wasinactive \
|
2008-10-30 14:59:14 +00:00
|
|
|
mark_service_hotplugged mark_service_failed \
|
2008-01-07 09:39:44 +00:00
|
|
|
rc-abort
|
2008-03-03 13:04:08 +00:00
|
|
|
ALL_LINKS= ${BINLINKS} ${SBINLINKS} ${RC_BINLINKS} ${RC_SBINLINKS}
|
|
|
|
CLEANFILES+= ${ALL_LINKS}
|
2008-01-05 20:49:48 +00:00
|
|
|
|
2008-07-27 11:30:49 +00:00
|
|
|
CPPFLAGS+= -I../includes -I../librc -I../libeinfo
|
2008-02-02 13:00:01 +00:00
|
|
|
LDFLAGS+= -L../librc -L../libeinfo
|
|
|
|
LDADD+= -lutil -lrc -leinfo
|
|
|
|
|
2008-01-10 16:35:59 +00:00
|
|
|
MK= ../../mk
|
2008-07-27 11:30:49 +00:00
|
|
|
include ${MK}/debug.mk
|
2008-01-10 16:35:59 +00:00
|
|
|
include ${MK}/prog.mk
|
2008-03-19 15:22:20 +00:00
|
|
|
include ${MK}/cc.mk
|
2008-01-30 15:00:58 +00:00
|
|
|
|
2008-01-12 20:38:57 +00:00
|
|
|
include ${MK}/${MKTERMCAP}.mk
|
2008-01-07 09:39:44 +00:00
|
|
|
LDADD+= ${LIBDL} ${LIBKVM}
|
2008-01-12 20:38:57 +00:00
|
|
|
include ${MK}/${MKPAM}.mk
|
2008-01-05 20:49:48 +00:00
|
|
|
|
2008-12-04 13:12:46 +00:00
|
|
|
_SVNVER_SH= if type svnversion >/dev/null 2>&1; then \
|
|
|
|
echo "-svn-$$(svnversion)"; \
|
|
|
|
else \
|
|
|
|
echo ""; \
|
|
|
|
fi
|
|
|
|
_SVNVER!= ${_SVNVER_SH}
|
|
|
|
SVNVER= ${_SVNVER}$(shell ${_SVNVER_SH})
|
|
|
|
|
2008-01-09 11:44:43 +00:00
|
|
|
${SRCS}: version.h
|
2008-01-05 20:49:48 +00:00
|
|
|
version.h:
|
2008-12-04 13:12:46 +00:00
|
|
|
sed -n -e 's/^VERSION=[[:space:]]*\([^[:space:]]*\).*/#define VERSION "\1${SVNVER}\"/p' ../../Makefile > version.h
|
2008-01-05 20:49:48 +00:00
|
|
|
if test -n "${BRANDING}"; then \
|
|
|
|
echo "#define BRANDING \"${BRANDING}\"" >> version.h; \
|
|
|
|
fi
|
|
|
|
|
2008-01-06 19:52:43 +00:00
|
|
|
install: all
|
2008-02-28 11:08:49 +00:00
|
|
|
${INSTALL} -d ${DESTDIR}${SBINDIR}
|
|
|
|
${INSTALL} -m ${BINMODE} ${PROG} ${DESTDIR}${SBINDIR}
|
2008-01-05 20:49:48 +00:00
|
|
|
${INSTALL} -d ${DESTDIR}${BINDIR}
|
2008-05-13 00:03:10 +00:00
|
|
|
for x in ${BINLINKS}; do ln -fs ${SBINDIR}/${PROG} ${DESTDIR}${BINDIR}/$$x; done
|
2008-02-28 11:08:49 +00:00
|
|
|
${INSTALL} -d ${DESTDIR}${SBINDIR}
|
|
|
|
for x in ${SBINLINKS}; do ln -fs ${PROG} ${DESTDIR}${SBINDIR}/$$x; done
|
|
|
|
${INSTALL} -d ${DESTDIR}${LINKDIR}/bin
|
2008-05-13 00:03:10 +00:00
|
|
|
for x in $(RC_BINLINKS); do ln -fs ${SBINDIR}/${PROG} ${DESTDIR}${LINKDIR}/bin/$$x; done
|
2008-02-28 11:08:49 +00:00
|
|
|
${INSTALL} -d ${DESTDIR}${LINKDIR}/sbin
|
2008-05-13 00:03:10 +00:00
|
|
|
for x in ${RC_SBINLINKS}; do ln -fs ${SBINDIR}/${PROG} ${DESTDIR}${LINKDIR}/sbin/$$x; done
|
2008-01-13 10:21:22 +00:00
|
|
|
if test "${MKPAM}" = pam; then \
|
2008-01-05 20:54:34 +00:00
|
|
|
${INSTALL} -d ${DESTDIR}${PAMDIR}; \
|
2008-01-09 11:44:43 +00:00
|
|
|
${INSTALL} -m ${PAMMODE} start-stop-daemon.pam ${DESTDIR}${PAMDIR}/start-stop-daemon; \
|
2008-01-05 20:49:48 +00:00
|
|
|
fi
|
2008-01-14 05:32:39 +00:00
|
|
|
|
2008-03-24 06:10:40 +00:00
|
|
|
check test::
|
|
|
|
|
2008-01-14 05:32:39 +00:00
|
|
|
links: rc
|
2008-03-03 13:04:08 +00:00
|
|
|
for l in ${ALL_LINKS}; do ln -sf rc $$l || exit $$? ; done
|