Allow for OS and SUBOS folders so we can introduce NetBSD scripts whilst keeping BSD for all BSD's.

This commit is contained in:
Roy Marples 2008-01-10 16:35:59 +00:00
parent 2643f2e605
commit 4314784520
44 changed files with 257 additions and 307 deletions

View File

@ -1,33 +1,19 @@
# OpenRC Makefile
# Copyright 2007 Roy Marples
# Copyright 2007-2008 Roy Marples
# Distributed under the terms of the GNU General Public License v2
NAME= openrc
VERSION= 0.1
PKG = $(NAME)-$(VERSION)
PKG= ${NAME}-${VERSION}
SUBDIR= conf.d doc etc init.d man net runlevels sh src
TOPDIR = .
include $(TOPDIR)/default.mk
MK= mk
include ${MK}/os.mk
include ${MK}/subdir.mk
include ${MK}/dist.mk
install::
$(INSTALL) -d $(DESTDIR)$(RC_LIB)/init.d
$(INSTALL) -d $(DESTDIR)$(RC_LIB)/tmp
clean::
rm -f *.bz2
dist:
$(INSTALL) -d /tmp/$(PKG)
cp -RPp . /tmp/$(PKG)
(cd /tmp/$(PKG); git clean; $(MAKE) clean)
rm -rf /tmp/$(PKG)/*.bz2 /tmp/$(PKG)/.git /tmp/$(PKG)/test
rm -rf /tmp/$(PKG)/.gitignore /tmp/$(PKG)/src/.gitignore
sed -i.bak -e '/LDFLAGS += -Wl,-rpath ./ s/^/#/' /tmp/$(PKG)/src/Makefile
rm -f /tmp/$(PKG)/src/Makefile.bak
tar cvjpf $(PKG).tar.bz2 -C /tmp $(PKG)
rm -rf /tmp/$(PKG)
ls -l $(PKG).tar.bz2
# vim: set ts=4 :
INSTALLAFTER= _installafter
_installafter:
${INSTALL} -d ${DESTDIR}${RC_LIB}/init.d
${INSTALL} -d ${DESTDIR}${RC_LIB}/tmp

3
README
View File

@ -4,8 +4,7 @@ OpenRC README
Installation
------------
make install
Yup, that simple. Works with GNU make, FreeBSD make and pmake. Should work
with every other make too.
Yup, that simple. Works with GNU make and BSD make.
You may wish to tweak the installation with the below arguments
PROGLDFLAGS=-static

View File

@ -1,5 +1,5 @@
DIR= /etc/conf.d
CONF = $(CONTENTS)
CONF= ${CONTENTS}
TOPDIR = ..
include $(TOPDIR)/default.mk
MK= ../mk
include ${MK}/scripts.mk

View File

@ -2,5 +2,5 @@ DIR = /etc/conf.d
CONF= consolefont keymaps modules
CONF_APPEND= clock
TOPDIR = ..
include $(TOPDIR)/default.mk
MK= ../mk
include ${MK}/scripts.mk

View File

@ -1,5 +1,5 @@
DIR= /etc/conf.d
CONF = $(CONTENTS)
CONF= ${CONTENTS}
TOPDIR = ..
include $(TOPDIR)/default.mk
MK= ../mk
include ${MK}/scripts.mk

View File

@ -1,65 +0,0 @@
# Common makefile settings
# We shouldn't use PREFIX as we need to install into /
_LIBNAME_SH= l=`readlink /lib`; case "$$l" in /lib64|lib64) echo "lib64";; *) echo "lib";; esac
_LIBNAME!= ${_LIBNAME_SH}
LIBNAME= ${_LIBNAME}$(shell ${_LIBNAME_SH})
RC_LIB= /${LIBNAME}/rc
INSTALL?= install
_OS_SH= u=`uname -s`; case "$${u}" in *BSD|DragonFly) echo "BSD";; *) echo "$${u}";; esac
_OS!= ${_OS_SH}
OS?= ${_OS}$(shell ${_OS_SH})
# We store the contents of the directory for ease of use in Makefiles
_CONTENTS_SH= ls -1 | grep -v Makefile | xargs
_CONTENTS!= ${_CONTENTS_SH}
CONTENTS= ${_CONTENTS}$(shell ${_CONTENTS_SH})
# Recursive rules
# Adapted from FreeBSDs bsd.subdir.mk
_+_ ?= +
ECHODIR ?= echo
_SUBDIR = @${_+_}for x in ${SUBDIR}; do \
if test -d $$x; then \
${ECHODIR} "===> ${DIRPRFX}$$x ($@)"; \
cd $$x; \
${MAKE} $@ DIRPRFX=${DIRPRFX}$$x/ || exit $$?; \
cd ..; \
fi; \
if test -d $$x.${OS}; then \
${ECHODIR} "===> ${DIRPRFX}$$x.${OS} ($@)"; \
cd $$x.${OS}; \
${MAKE} $@ DIRPRFX=${DIRPRFX}$$x/ || exit $$?; \
cd ..; \
fi; \
done
all:
${_SUBDIR}
clean::
${_SUBDIR}
depend::
${_SUBDIR}
install::
${_SUBDIR}
install:: ${BIN} ${CONF} ${CONF_APPEND}
if test -n "${DIR}"; then ${INSTALL} -d ${DESTDIR}${DIR} || exit $$?; fi
if test -n "${BIN}"; then ${INSTALL} ${BIN} ${DESTDIR}${DIR} || exit $$?; fi
if test -n "${INC}"; then ${INSTALL} -m 0644 ${INC} ${DESTDIR}${DIR} || exit $$?; fi
for x in ${CONF}; do \
if ! test -e ${DESTDIR}${DIR}/$$x; then \
${INSTALL} -m 0644 $$x ${DESTDIR}${DIR} || exit $$?; \
fi; \
done
for x in ${CONF_APPEND}; do \
if test -e ${DESTDIR}${DIR}/$$x; then \
cat $$x >> ${DESTDIR}${DIR}/$$x || exit $$?; \
else \
${INSTALL} -m 0644 $$x ${DESTDIR}${DIR} || exit $$?; \
fi; \
done
# vim: set ts=4 :

View File

@ -1,5 +1,5 @@
DIR= /usr/share/doc/openrc
INC = $(CONTENTS)
INC= ${CONTENTS}
TOPDIR = ..
include $(TOPDIR)/default.mk
MK= ../mk
include ${MK}/scripts.mk

View File

@ -1,5 +1,5 @@
DIR= /usr/share/doc/openrc
INC = $(CONTENTS)
INC= ${CONTENTS}
TOPDIR = ..
include $(TOPDIR)/default.mk
MK= ../mk
include ${MK}/scripts.mk

View File

@ -2,5 +2,5 @@ DIR = /etc
CONF= devd.conf rc rc.shutdown
BIN= rc.devd
TOPDIR = ..
include $(TOPDIR)/default.mk
MK= ../mk
include ${MK}/scripts.mk

View File

@ -1,5 +1,5 @@
DIR= /etc
CONF_APPEND= rc.conf
TOPDIR = ..
include $(TOPDIR)/default.mk
MK= ../mk
include ${MK}/scripts.mk

View File

@ -1,5 +1,5 @@
DIR= /etc
CONF= rc.conf
TOPDIR = ..
include $(TOPDIR)/default.mk
MK= ../mk
include ${MK}/scripts.mk

View File

@ -1,5 +1,5 @@
DIR= /etc/init.d
BIN = $(CONTENTS)
BIN= ${CONTENTS}
TOPDIR = ..
include $(TOPDIR)/default.mk
MK= ../mk
include ${MK}/scripts.mk

View File

@ -1,5 +1,5 @@
DIR= /etc/init.d
BIN = $(CONTENTS)
BIN= ${CONTENTS}
TOPDIR = ..
include $(TOPDIR)/default.mk
MK= ../mk
include ${MK}/scripts.mk

View File

@ -1,5 +1,5 @@
DIR= /etc/init.d
BIN = $(CONTENTS)
BIN= ${CONTENTS}
TOPDIR = ..
include $(TOPDIR)/default.mk
MK= ../mk
include ${MK}/scripts.mk

View File

@ -1,13 +1,10 @@
DIR= /usr/share/man
_MAN3_SH= ls -1 *.3
_MAN3 != $(_MAN3_SH)
MAN3 = $(_MAN3)$(shell $(_MAN3_SH))
_MAN3!= ${_MAN3_SH}
MAN3= ${_MAN3}$(shell ${_MAN3_SH})
_MAN8_SH= ls -1 *.8
_MAN8 != $(_MAN8_SH)
MAN8 = $(_MAN8)$(shell $(_MAN8_SH))
TOPDIR = ..
include $(TOPDIR)/default.mk
_MAN8!= ${_MAN8_SH}
MAN8= ${_MAN8}$(shell ${_MAN8_SH})
# Handy macro to create symlinks
# This does rely on correctly formatting our manpages!
@ -17,18 +14,24 @@ MAKE_LINKS = suffix=$${man\#*.}; \
-n -e '/^\.Sh NAME$$/,/\.Sh/ s/\.Nm //p' $${man}`; do \
if test "$${link}" != "$${prefix}" ; then \
ln -sf $${man} \
$(DESTDIR)/$(DIR)/man$${suffix}/$${link}.$${suffix} ; \
${DESTDIR}/${DIR}/man$${suffix}/$${link}.$${suffix} ; \
fi; \
done;
install::
$(INSTALL) -d $(DESTDIR)/$(DIR)/man3
for man in $(MAN3); do \
$(INSTALL) -m 0644 "$$man" $(DESTDIR)/$(DIR)/man3 || exit $$?; \
$(MAKE_LINKS) \
INSTALL?= install
all:
install:
${INSTALL} -d ${DESTDIR}/${DIR}/man3
for man in ${MAN3}; do \
${INSTALL} -m 0644 "$$man" ${DESTDIR}/${DIR}/man3 || exit $$?; \
${MAKE_LINKS} \
done
$(INSTALL) -d $(DESTDIR)/$(DIR)/man8
for man in $(MAN8); do \
$(INSTALL) -m 0644 "$$man" $(DESTDIR)/$(DIR)/man8 || exit $$?; \
$(MAKE_LINKS) \
${INSTALL} -d ${DESTDIR}/${DIR}/man8
for man in ${MAN8}; do \
${INSTALL} -m 0644 "$$man" ${DESTDIR}/${DIR}/man8 || exit $$?; \
${MAKE_LINKS} \
done
clean:

View File

View File

View File

@ -62,4 +62,4 @@ install: all
clean:
rm -f ${OBJS} ${SOBJS} ${_LIBS} ${SHLIB_LINK} ${CLEANFILES}
include ${TOPDIR}/depend.mk
include ${MK}/depend.mk

View File

@ -2,14 +2,21 @@
# Generic definitions
_OS_SH= u=`uname -s`; case "$${u}" in *BSD|DragonFly) echo "BSD";; *) echo "$${u}";; esac
_OS_SH_= uname -s
_OS!= ${_OS_SH}
OS?= ${_OS}$(shell ${_OS_SH})
_SUBOS_SH= case `uname -s` in \
*BSD|DragonFly) echo "BSD";; \
*) echo "";; \
esac
_SUBOS!= ${_SUBOS_SH}
SUBOS?= ${_SUBOS}$(shell ${_SUBOS_SH})
_LIBNAME_SH= l=`readlink /lib`; case "$$l" in /lib64|lib64) echo "lib64";; *) echo "lib";; esac
_LIBNAME!= ${_LIBNAME_SH}
LIBNAME?= ${_LIBNAME}$(shell ${_LIBNAME_SH})
RC_LIB= /$(LIB)/rc
RC_LIB= /$(LIBNAME)/rc
_DEF_SH= case `uname -s` in Linux) echo "-D_XOPEN_SOURCE=600 -D_BSD_SOURCE";; *) echo;; esac
_DEF!= ${_DEF_SH}

View File

@ -16,4 +16,4 @@ ${PROG}: ${SCRIPTS} ${OBJS}
clean:
rm -f ${OBJS} ${PROG} ${CLEANFILES}
include ${TOPDIR}/depend.mk
include ${MK}/depend.mk

34
mk/scripts.mk Normal file
View File

@ -0,0 +1,34 @@
# Install rules for our scripts
# Copyright 2007-2008 Roy Marples <roy@marples.name>
# We store the contents of the directory for ease of use in Makefiles
_CONTENTS_SH= ls -1 | grep -v Makefile | xargs
_CONTENTS!= ${_CONTENTS_SH}
CONTENTS= ${_CONTENTS}$(shell ${_CONTENTS_SH})
INSTALL?= install
include ${MK}/os.mk
all:
realinstall: ${BIN} ${CONF} ${CONF_APPEND}
if test -n "${DIR}"; then ${INSTALL} -d ${DESTDIR}${DIR} || exit $$?; fi
if test -n "${BIN}"; then ${INSTALL} ${BIN} ${DESTDIR}${DIR} || exit $$?; fi
if test -n "${INC}"; then ${INSTALL} -m 0644 ${INC} ${DESTDIR}${DIR} || exit $$?; fi
for x in ${CONF}; do \
if ! test -e ${DESTDIR}${DIR}/$$x; then \
${INSTALL} -m 0644 $$x ${DESTDIR}${DIR} || exit $$?; \
fi; \
done
for x in ${CONF_APPEND}; do \
if test -e ${DESTDIR}${DIR}/$$x; then \
cat $$x >> ${DESTDIR}${DIR}/$$x || exit $$?; \
else \
${INSTALL} -m 0644 $$x ${DESTDIR}${DIR} || exit $$?; \
fi; \
done
install: realinstall ${INSTALLAFTER}
clean:

39
mk/subdir.mk Normal file
View File

@ -0,0 +1,39 @@
# Recursive rules
# Adapted from FreeBSDs bsd.subdir.mk
# Copyright 2007-2008 Roy Marples <roy@marples.name>
_+_ ?= +
ECHODIR ?= echo
_SUBDIR = @${_+_}for x in ${SUBDIR}; do \
if test -d $$x; then \
${ECHODIR} "===> ${DIRPRFX}$$x (${@:realinstall=install})"; \
cd $$x; \
${MAKE} ${@:realinstall=install} \
DIRPRFX=${DIRPRFX}$$x/ || exit $$?; \
cd ..; \
fi; \
if test -d $$x.${OS}; then \
${ECHODIR} "===> ${DIRPRFX}$$x.${OS} (${@:realinstall=install})"; \
cd $$x.${OS}; \
${MAKE} ${@:realinstall=install} \
DIRPRFX=${DIRPRFX}$$x.${OS}/ || exit $$?; \
cd ..; \
fi; \
if test -d $$x.${SUBOS}; then \
${ECHODIR} "===> ${DIRPRFX}$$x.${SUBOS} (${@:realinstall=install})"; \
cd $$x.${SUBOS}; \
${MAKE} ${@:realinstall=install} \
DIRPRFX=${DIRPRFX}$$x.${SUBOS}/ || exit $$?; \
cd ..; \
fi; \
done
all:
${_SUBDIR}
clean:
${_SUBDIR}
realinstall:
${_SUBDIR}
install: realinstall ${INSTALLAFTER}
depend:
${_SUBDIR}

View File

@ -1,5 +1,5 @@
DIR = $(RC_LIB)/net
INC = $(CONTENTS)
DIR = ${RC_LIB}/net
INC = ${CONTENTS}
TOPDIR = ..
include $(TOPDIR)/default.mk
MK= ../mk
include ${MK}/scripts.mk

View File

@ -1,5 +1,5 @@
DIR = $(RC_LIB)/net
INC = $(CONTENTS)
DIR = ${RC_LIB}/net
INC = ${CONTENTS}
TOPDIR = ..
include $(TOPDIR)/default.mk
MK= ../mk
include ${MK}/scripts.mk

View File

@ -1,5 +1,5 @@
DIR = $(RC_LIB)/net
INC = $(CONTENTS)
DIR= ${RC_LIB}/net
INC= ${CONTENTS}
TOPDIR = ..
include $(TOPDIR)/default.mk
MK= ../mk
include ${MK}/scripts.mk

View File

@ -1,7 +1,5 @@
BOOT= dumpon hostid net.lo0 newsyslog savecore syscons syslogd
DEFAULT= local.rc mixer powerd
TOPDIR = ..
include $(TOPDIR)/runlevels.mk
# vim: set ts=4 :
MK= ../mk
include ${MK}/runlevels.mk

View File

@ -1,7 +1,5 @@
BOOT= consolefont keymaps modules net.lo procfs
DEFAULT= hdparm
TOPDIR = ..
include $(TOPDIR)/runlevels.mk
# vim: set ts=4 :
MK= ../mk
include ${MK}/runlevels.mk

View File

@ -1,23 +0,0 @@
# Handy runlevel stuff
LEVELDIR = $(DESTDIR)/etc/runlevels
BOOTDIR = $(LEVELDIR)/boot
DEFAULTDIR = $(LEVELDIR)/default
INSTALL ?= install
install:
if ! test -d "$(BOOTDIR)"; then \
$(INSTALL) -d $(BOOTDIR) || exit $$?; \
for x in $(BOOT); do ln -snf /etc/init.d/"$$x" $(BOOTDIR)/"$$x" || exit $$?; done \
fi
if ! test -d "$(DEFAULTDIR)"; then \
$(INSTALL) -d $(DEFAULTDIR) || exit $$?; \
for x in $(DEFAULT); do ln -snf /etc/init.d/"$$x" $(DEFAULTDIR)/"$$x" || exit $$?; done \
fi
all:
clean:
depend:
# vim: set ts=4 :

View File

@ -1,11 +1,10 @@
BOOT = bootmisc checkroot checkfs clock hostname localmount swap sysctl urandom
BOOT= bootmisc checkroot checkfs clock hostname localmount \
swap sysctl urandom
DEFAULT= local netmount
LEVELDIR = $(DESTDIR)/etc/runlevels
BOOTDIR = $(LEVELDIR)/boot
DEFAULTDIR = $(LEVELDIR)/default
LEVELDIR= ${DESTDIR}/etc/runlevels
BOOTDIR= ${LEVELDIR}/boot
DEFAULTDIR= ${LEVELDIR}/default
TOPDIR = ..
include $(TOPDIR)/runlevels.mk
# vim: set ts=4 :
MK= ../mk
include ${MK}/runlevels.mk

View File

@ -1,5 +1,5 @@
DIR = $(RC_LIB)/sh
BIN = $(CONTENTS)
DIR= ${RC_LIB}/sh
BIN= ${CONTENTS}
TOPDIR = ..
include $(TOPDIR)/default.mk
MK= ../mk
include ${MK}/scripts.mk

View File

@ -1,5 +1,5 @@
DIR = $(RC_LIB)/sh
BIN = $(CONTENTS)
DIR= ${RC_LIB}/sh
BIN= ${CONTENTS}
TOPDIR = ..
include $(TOPDIR)/default.mk
MK= ../mk
include ${MK}/scripts.mk

View File

@ -1,23 +1,26 @@
DIR = $(RC_LIB)/sh
DIR= ${RC_LIB}/sh
INC= functions.sh init-common-post.sh rc-functions.sh rc-mount.sh
BIN= gendepends.sh net.sh runscript.sh
TOPDIR = ..
include $(TOPDIR)/default.mk
MK= ../mk
# To get NET_LO
include Makefile.$(OS)
include ${MK}/os.mk
include Makefile.${SUBOS}
install::
INSTALLAFTER= _installafter
_installafter:
@# Handle lib correctly
if test $(LIBNAME) != "lib"; then \
sed -i'.bak' -e 's,/lib/,/$(LIBNAME)/,g' $(DESTDIR)/$(RC_LIB)/sh/functions.sh || exit $$?; \
rm -f $(DESTDIR)/$(RC_LIB)/sh/functions.sh.bak; \
sed -i'.bak' -e 's,/lib/,/$(LIBNAME)/,g' $(DESTDIR)/$(RC_LIB)/sh/rc-functions.sh || exit $$?; \
rm -f $(DESTDIR)/$(RC_LIB)/sh/rc-functions.sh.bak; \
if test ${LIBNAME} != "lib"; then \
sed -i'.bak' -e 's,/lib/,/${LIBNAME}/,g' ${DESTDIR}/${RC_LIB}/sh/functions.sh || exit $$?; \
rm -f ${DESTDIR}/${RC_LIB}/sh/functions.sh.bak; \
sed -i'.bak' -e 's,/lib/,/${LIBNAME}/,g' ${DESTDIR}/${RC_LIB}/sh/rc-functions.sh || exit $$?; \
rm -f ${DESTDIR}/${RC_LIB}/sh/rc-functions.sh.bak; \
fi
@# Provide an init script for the loopback interface
ln -snf $(RC_LIB)/sh/net.sh $(DESTDIR)/etc/init.d/$(NET_LO) || exit $$?
@# Put functions.sh into the init.d dir so 3rd part apps don't have to
ln -snf ${RC_LIB}/sh/net.sh ${DESTDIR}/etc/init.d/${NET_LO} || exit $$?
@# Put functions.sh into the init.d dir so 3rd party apps don't have to
@# be multilib aware
ln -snf $(RC_LIB)/sh/functions.sh $(DESTDIR)/etc/init.d || exit $$?
ln -snf ${RC_LIB}/sh/functions.sh ${DESTDIR}/etc/init.d || exit $$?
include ${MK}/scripts.mk

View File

@ -2,5 +2,5 @@
SUBDIR= libeinfo librc rc
TOPDIR= ..
include ${TOPDIR}/subdir.mk
MK= ../mk
include ${MK}/subdir.mk

View File

@ -1,5 +1,5 @@
TOPDIR= ..
include ${TOPDIR}/os.mk
MK= ../../mk
include ${MK}/os.mk
LIB= einfo
SHLIB_MAJOR= 1
@ -9,8 +9,8 @@ VERSION_MAP= einfo.map
SHLIBDIR= /${LIBNAME}
CFLAGS+= -I${TOPDIR}
CFLAGS+= -I../includes
include ${TOPDIR}/cc.mk
include ${TOPDIR}/lib.mk
include ${TOPDIR}/${TERMCAP}.mk
include ${MK}/cc.mk
include ${MK}/lib.mk
include ${MK}/${TERMCAP}.mk

View File

@ -1,5 +1,5 @@
TOPDIR= ..
include ${TOPDIR}/os.mk
MK= ../../mk
include ${MK}/os.mk
LIB= rc
SHLIB_MAJOR= 1
@ -11,9 +11,9 @@ VERSION_MAP= rc.map
CFLAGS+= -DLIB=\"${LIBNAME}\"
LDADD+= ${LIBKVM}
CFLAGS+= -I${TOPDIR}
CFLAGS+= -I../includes
SHLIBDIR= /${LIBNAME}
include ${TOPDIR}/cc.mk
include ${TOPDIR}/lib.mk
include ${MK}/cc.mk
include ${MK}/lib.mk

View File

@ -5,11 +5,9 @@ SRCS= checkpath.c fstabinfo.c mountinfo.c rc.c rc-depend.c \
CLEANFILES= version.h
TOPDIR= ..
LDFLAGS+= -L${TOPDIR}/librc -L${TOPDIR}/libeinfo
LDFLAGS+= -L../librc -L../libeinfo
LDADD+= -lutil -lrc -leinfo
CFLAGS+= -I${TOPDIR} -I${TOPDIR}/librc -I${TOPDIR}/libeinfo
CFLAGS+= -I../includes -I../librc -I../libeinfo
BINDIR?= /sbin
@ -32,14 +30,15 @@ RC_SBINLINKS= mark_service_starting mark_service_started \
mark_service_coldplugged mark_service_failed \
rc-abort
include ${TOPDIR}/os.mk
MK= ../../mk
include ${MK}/os.mk
CFLAGS+= -DLIB=\"${LIBNAME}\"
include ${TOPDIR}/cc.mk
include ${TOPDIR}/prog.mk
include ${MK}/cc.mk
include ${MK}/prog.mk
include ${TOPDIR}/${TERMCAP}.mk
include ${MK}/${TERMCAP}.mk
LDADD+= ${LIBDL} ${LIBKVM}
include ${TOPDIR}/${PAM}.mk
include ${MK}/${PAM}.mk
${SRCS}: version.h
version.h:
@ -54,7 +53,7 @@ install: all
${INSTALL} -d ${DESTDIR}/bin
for x in ${BINLINKS}; do ln -fs ${BINDIR}/${PROG} ${DESTDIR}/bin/$$x; done
${INSTALL} -d ${DESTDIR}/bin
for x in ${SBINLINKS}; do ln -fs ${BINDIR}/${PROG} ${DESTDIR}${BINDIR}/$$x; done
for x in ${SBINLINKS}; do ln -fs ${PROG} ${DESTDIR}${BINDIR}/$$x; done
${INSTALL} -d ${DESTDIR}/${LIBNAME}/${PROG}/bin
for x in $(RC_BINLINKS); do ln -fs ${BINDIR}/${PROG} $(DESTDIR)/${LIBNAME}/${PROG}/bin/$$x; done
${INSTALL} -d ${DESTDIR}/${LIBNAME}/${PROG}/sbin

View File

@ -1,27 +0,0 @@
# Recursive rules
# Adapted from FreeBSDs bsd.subdir.mk
_+_ ?= +
ECHODIR ?= echo
_SUBDIR = @${_+_}for x in ${SUBDIR}; do \
if test -d $$x; then \
${ECHODIR} "===> ${DIRPRFX}$$x ($@)"; \
cd $$x; \
${MAKE} $@ DIRPRFX=${DIRPRFX}$$x/ || exit $$?; \
cd ..; \
fi; \
if test -d $$x.${OS}; then \
${ECHODIR} "===> ${DIRPRFX}$$x.${OS} ($@)"; \
cd $$x.${OS}; \
${MAKE} $@ DIRPRFX=${DIRPRFX}$$x/ || exit $$?; \
cd ..; \
fi; \
done
all:
${_SUBDIR}
clean:
${_SUBDIR}
install:
${_SUBDIR}
depend:
${_SUBDIR}