consolodate Makefiles
The tree contained many operating system specific Makefiles which were being included in other Makefiles. This commit removes those and adds the code to the makefiles which included them using make's conditional processing. X-Gentoo-Bug: 387441 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=387441
This commit is contained in:
parent
9f95878bbd
commit
ecf77254bb
@ -6,7 +6,16 @@ CLEANFILES+= network staticroute
|
|||||||
|
|
||||||
MK= ../mk
|
MK= ../mk
|
||||||
include ${MK}/os.mk
|
include ${MK}/os.mk
|
||||||
include Makefile.${OS}
|
|
||||||
|
ifeq ($(OS),FreeBSD)
|
||||||
|
CONF+= ipfw moused powerd rarpd savecore syscons
|
||||||
|
else ifeq ($(OS),Linux)
|
||||||
|
CONF+= consolefont dmesg hwclock keymaps killprocs modules
|
||||||
|
SOS= Linux
|
||||||
|
else ifeq ($(OS),NetBSD)
|
||||||
|
CONF+= moused rarpd savecore
|
||||||
|
endif
|
||||||
|
|
||||||
include ${MK}/scripts.mk
|
include ${MK}/scripts.mk
|
||||||
|
|
||||||
SOS?= BSD
|
SOS?= BSD
|
||||||
|
@ -1 +0,0 @@
|
|||||||
CONF+= ipfw moused powerd rarpd savecore syscons
|
|
@ -1,2 +0,0 @@
|
|||||||
CONF+= consolefont dmesg hwclock keymaps killprocs modules
|
|
||||||
SOS= Linux
|
|
@ -1 +0,0 @@
|
|||||||
CONF+= moused rarpd savecore
|
|
22
doc/Makefile
22
doc/Makefile
@ -3,5 +3,25 @@ INC= net.example
|
|||||||
|
|
||||||
MK= ../mk
|
MK= ../mk
|
||||||
include ${MK}/os.mk
|
include ${MK}/os.mk
|
||||||
include Makefile.${OS}
|
|
||||||
|
ifeq ($(OS),FreeBSD)
|
||||||
|
SRCS+= net.example.in
|
||||||
|
|
||||||
|
.SUFFIXES: .BSD.in
|
||||||
|
.BSD.in:
|
||||||
|
${CP} $< $@
|
||||||
|
else ifeq ($(OS),Linux)
|
||||||
|
SRCS+= net.example.in
|
||||||
|
|
||||||
|
.SUFFIXES: .Linux.in
|
||||||
|
.Linux.in:
|
||||||
|
${CP} $< $@
|
||||||
|
else ifeq ($(OS),NetBSD)
|
||||||
|
SRCS+= net.example.in
|
||||||
|
|
||||||
|
.SUFFIXES: .BSD.in
|
||||||
|
.BSD.in:
|
||||||
|
${CP} $< $@
|
||||||
|
endif
|
||||||
|
|
||||||
include ${MK}/scripts.mk
|
include ${MK}/scripts.mk
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
SRCS+= net.example.in
|
|
||||||
|
|
||||||
.SUFFIXES: .BSD.in
|
|
||||||
.BSD.in:
|
|
||||||
${CP} $< $@
|
|
@ -1,5 +0,0 @@
|
|||||||
SRCS+= net.example.in
|
|
||||||
|
|
||||||
.SUFFIXES: .Linux.in
|
|
||||||
.Linux.in:
|
|
||||||
${CP} $< $@
|
|
@ -1,5 +0,0 @@
|
|||||||
SRCS+= net.example.in
|
|
||||||
|
|
||||||
.SUFFIXES: .BSD.in
|
|
||||||
.BSD.in:
|
|
||||||
${CP} $< $@
|
|
16
etc/Makefile
16
etc/Makefile
@ -5,7 +5,21 @@ CLEANFILES+= rc.conf
|
|||||||
|
|
||||||
MK= ../mk
|
MK= ../mk
|
||||||
include ${MK}/os.mk
|
include ${MK}/os.mk
|
||||||
include Makefile.${OS}
|
|
||||||
|
ifeq ($(OS),FreeBSD)
|
||||||
|
SED_EXTRA= -e 's:@TERM@:cons25:g'
|
||||||
|
SRCS+= rc.conf.in rc.in rc.shutdown.in
|
||||||
|
CONF+= devd.conf
|
||||||
|
BIN+= rc rc.shutdown rc.devd
|
||||||
|
else ifeq ($(OS),Linux)
|
||||||
|
SED_EXTRA= -e 's:@TERM@:wsvt25:g'
|
||||||
|
SRCS+= rc.conf.in rc.in rc.shutdown.in
|
||||||
|
else ifeq ($(OS),NetBSD)
|
||||||
|
SED_EXTRA= -e 's:@TERM@:wsvt25:g'
|
||||||
|
SRCS+= rc.conf.in rc.in rc.shutdown.in
|
||||||
|
BIN+= rc rc.shutdown
|
||||||
|
endif
|
||||||
|
|
||||||
include ${MK}/scripts.mk
|
include ${MK}/scripts.mk
|
||||||
|
|
||||||
# We can't use "ifndef" here because that treats set-but-empty
|
# We can't use "ifndef" here because that treats set-but-empty
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
SED_EXTRA= -e 's:@TERM@:cons25:g'
|
|
||||||
SRCS+= rc.conf.in rc.in rc.shutdown.in
|
|
||||||
CONF+= devd.conf
|
|
||||||
BIN+= rc rc.shutdown rc.devd
|
|
@ -1,2 +0,0 @@
|
|||||||
SED_EXTRA= -e 's:@TERM@:wsvt25:g'
|
|
||||||
SRCS+= rc.conf.in rc.in rc.shutdown.in
|
|
@ -1,3 +0,0 @@
|
|||||||
SED_EXTRA= -e 's:@TERM@:wsvt25:g'
|
|
||||||
SRCS+= rc.conf.in rc.in rc.shutdown.in
|
|
||||||
BIN+= rc rc.shutdown
|
|
@ -8,4 +8,11 @@ MK= ../mk
|
|||||||
SED_EXTRA+= -e 's:@VARBASE@:/var:g'
|
SED_EXTRA+= -e 's:@VARBASE@:/var:g'
|
||||||
|
|
||||||
include ${MK}/scripts.mk
|
include ${MK}/scripts.mk
|
||||||
include Makefile.${OS}
|
|
||||||
|
ifeq ($(OS),FreeBSD)
|
||||||
|
PKG_PREFIX?= /usr/local
|
||||||
|
else ifeq ($(OS),Linux)
|
||||||
|
PKG_PREFIX?=/usr
|
||||||
|
else ifeq ($(OS),NetBSD)
|
||||||
|
PKG_PREFIX?= /usr/pkg
|
||||||
|
endif
|
||||||
|
@ -1 +0,0 @@
|
|||||||
PKG_PREFIX?= /usr/local
|
|
@ -1 +0,0 @@
|
|||||||
PKG_PREFIX?=/usr
|
|
@ -1 +0,0 @@
|
|||||||
PKG_PREFIX?= /usr/pkg
|
|
@ -16,7 +16,46 @@ TARGETS+= ${_NET_LO}
|
|||||||
|
|
||||||
MK= ../mk
|
MK= ../mk
|
||||||
include ${MK}/os.mk
|
include ${MK}/os.mk
|
||||||
include Makefile.${OS}
|
|
||||||
|
ifeq ($(OS),FreeBSD)
|
||||||
|
NET_LO= net.lo0
|
||||||
|
|
||||||
|
# Generic BSD scripts
|
||||||
|
SRCS+= hostid.in moused.in newsyslog.in pf.in rarpd.in rc-enabled.in \
|
||||||
|
rpcbind.in savecore.in syslogd.in
|
||||||
|
|
||||||
|
# These are FreeBSD specific
|
||||||
|
SRCS+= adjkerntz.in devd.in dumpon.in ipfw.in mixer.in nscd.in \
|
||||||
|
powerd.in syscons.in
|
||||||
|
|
||||||
|
.SUFFIXES: .BSD.in
|
||||||
|
.BSD.in:
|
||||||
|
sed ${SED_REPLACE} ${SED_EXTRA} $< > $@
|
||||||
|
else ifeq ($(OS),Linux)
|
||||||
|
NET_LO= net.lo
|
||||||
|
|
||||||
|
SRCS+= devfs.in dmesg.in hwclock.in consolefont.in keymaps.in killprocs.in \
|
||||||
|
modules.in mount-ro.in mtab.in numlock.in procfs.in sysfs.in \
|
||||||
|
termencoding.in
|
||||||
|
|
||||||
|
.SUFFIXES: .Linux.in
|
||||||
|
.Linux.in:
|
||||||
|
sed ${SED_REPLACE} ${SED_EXTRA} $< > $@
|
||||||
|
else ifeq ($(OS),NetBSD)
|
||||||
|
NET_LO= net.lo0
|
||||||
|
|
||||||
|
# Generic BSD scripts
|
||||||
|
SRCS+= hostid.in moused.in newsyslog.in pf.in rarpd.in rc-enabled.in \
|
||||||
|
rpcbind.in savecore.in syslogd.in
|
||||||
|
|
||||||
|
# These are NetBSD specific
|
||||||
|
SRCS+= devdb.in swap-blk.in ttys.in wscons.in
|
||||||
|
|
||||||
|
.SUFFIXES: .BSD.in
|
||||||
|
.BSD.in:
|
||||||
|
sed ${SED_REPLACE} ${SED_EXTRA} $< > $@
|
||||||
|
endif
|
||||||
|
|
||||||
include ${MK}/scripts.mk
|
include ${MK}/scripts.mk
|
||||||
|
|
||||||
_installafter_: realinstall
|
_installafter_: realinstall
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
NET_LO= net.lo0
|
|
||||||
|
|
||||||
# Generic BSD scripts
|
|
||||||
SRCS+= hostid.in moused.in newsyslog.in pf.in rarpd.in rc-enabled.in \
|
|
||||||
rpcbind.in savecore.in syslogd.in
|
|
||||||
|
|
||||||
# These are FreeBSD specific
|
|
||||||
SRCS+= adjkerntz.in devd.in dumpon.in ipfw.in mixer.in nscd.in \
|
|
||||||
powerd.in syscons.in
|
|
||||||
|
|
||||||
.SUFFIXES: .BSD.in
|
|
||||||
.BSD.in:
|
|
||||||
sed ${SED_REPLACE} ${SED_EXTRA} $< > $@
|
|
@ -1,9 +0,0 @@
|
|||||||
NET_LO= net.lo
|
|
||||||
|
|
||||||
SRCS+= devfs.in dmesg.in hwclock.in consolefont.in keymaps.in killprocs.in \
|
|
||||||
modules.in mount-ro.in mtab.in numlock.in procfs.in sysfs.in \
|
|
||||||
termencoding.in
|
|
||||||
|
|
||||||
.SUFFIXES: .Linux.in
|
|
||||||
.Linux.in:
|
|
||||||
sed ${SED_REPLACE} ${SED_EXTRA} $< > $@
|
|
@ -1,12 +0,0 @@
|
|||||||
NET_LO= net.lo0
|
|
||||||
|
|
||||||
# Generic BSD scripts
|
|
||||||
SRCS+= hostid.in moused.in newsyslog.in pf.in rarpd.in rc-enabled.in \
|
|
||||||
rpcbind.in savecore.in syslogd.in
|
|
||||||
|
|
||||||
# These are NetBSD specific
|
|
||||||
SRCS+= devdb.in swap-blk.in ttys.in wscons.in
|
|
||||||
|
|
||||||
.SUFFIXES: .BSD.in
|
|
||||||
.BSD.in:
|
|
||||||
sed ${SED_REPLACE} ${SED_EXTRA} $< > $@
|
|
27
net/Makefile
27
net/Makefile
@ -5,5 +5,30 @@ INC= dhclient.sh dhcpcd.sh ifconfig.sh macchanger.sh macnet.sh \
|
|||||||
|
|
||||||
MK= ../mk
|
MK= ../mk
|
||||||
include ${MK}/os.mk
|
include ${MK}/os.mk
|
||||||
include Makefile.${OS}
|
|
||||||
|
ifeq ($(OS),FreeBSD)
|
||||||
|
SRCS+= iwconfig.sh.in
|
||||||
|
INC+= iwconfig.sh
|
||||||
|
|
||||||
|
.SUFFIXES: .sh.BSD.in
|
||||||
|
.sh.BSD.in.sh:
|
||||||
|
${CP} $< $@
|
||||||
|
else ifeq ($(OS),Linux)
|
||||||
|
SRCS+= iwconfig.sh.in
|
||||||
|
INC+= adsl.sh apipa.sh arping.sh bonding.sh br2684ctl.sh bridge.sh \
|
||||||
|
ccwgroup.sh clip.sh ethtool.sh iproute2.sh ifplugd.sh ip6to4.sh \
|
||||||
|
ipppd.sh iwconfig.sh netplugd.sh pppd.sh pump.sh tuntap.sh udhcpc.sh \
|
||||||
|
vlan.sh
|
||||||
|
|
||||||
|
.SUFFIXES: .sh.Linux.in
|
||||||
|
.sh.Linux.in.sh:
|
||||||
|
${CP} $< $@
|
||||||
|
else ifeq ($(OS),NetBSD)
|
||||||
|
INC+= ifwatchd.sh
|
||||||
|
|
||||||
|
.SUFFIXES: .sh.BSD.in
|
||||||
|
.sh.BSD.in.sh:
|
||||||
|
${CP} $< $@
|
||||||
|
endif
|
||||||
|
|
||||||
include ${MK}/scripts.mk
|
include ${MK}/scripts.mk
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
SRCS+= iwconfig.sh.in
|
|
||||||
INC+= iwconfig.sh
|
|
||||||
|
|
||||||
.SUFFIXES: .sh.BSD.in
|
|
||||||
.sh.BSD.in.sh:
|
|
||||||
${CP} $< $@
|
|
@ -1,9 +0,0 @@
|
|||||||
SRCS+= iwconfig.sh.in
|
|
||||||
INC+= adsl.sh apipa.sh arping.sh bonding.sh br2684ctl.sh bridge.sh \
|
|
||||||
ccwgroup.sh clip.sh ethtool.sh iproute2.sh ifplugd.sh ip6to4.sh \
|
|
||||||
ipppd.sh iwconfig.sh netplugd.sh pppd.sh pump.sh tuntap.sh udhcpc.sh \
|
|
||||||
vlan.sh
|
|
||||||
|
|
||||||
.SUFFIXES: .sh.Linux.in
|
|
||||||
.sh.Linux.in.sh:
|
|
||||||
${CP} $< $@
|
|
@ -1,5 +0,0 @@
|
|||||||
INC+= ifwatchd.sh
|
|
||||||
|
|
||||||
.SUFFIXES: .sh.BSD.in
|
|
||||||
.sh.BSD.in.sh:
|
|
||||||
${CP} $< $@
|
|
@ -15,7 +15,26 @@ MK= ../mk
|
|||||||
include ${MK}/sys.mk
|
include ${MK}/sys.mk
|
||||||
include ${MK}/os.mk
|
include ${MK}/os.mk
|
||||||
include ${MK}/gitignore.mk
|
include ${MK}/gitignore.mk
|
||||||
include Makefile.${OS}
|
|
||||||
|
ifeq ($(OS),BSD)
|
||||||
|
BOOT+= hostid newsyslog savecore syslogd swap-blk
|
||||||
|
else ifeq ($(OS),FreeBSD)
|
||||||
|
# Generic BSD stuff
|
||||||
|
BOOT+= hostid net.lo0 newsyslog savecore syslogd
|
||||||
|
|
||||||
|
# FreeBSD specific stuff
|
||||||
|
BOOT+= adjkerntz dumpon syscons
|
||||||
|
else ifeq ($(OS),Linux)
|
||||||
|
SYSINIT+= devfs dmesg
|
||||||
|
BOOT+= hwclock keymaps modules mtab procfs termencoding
|
||||||
|
SHUTDOWN+= killprocs mount-ro
|
||||||
|
else ifeq ($(OS),NetBSD)
|
||||||
|
# Generic BSD stuff
|
||||||
|
BOOT+= hostid net.lo0 newsyslog savecore syslogd
|
||||||
|
|
||||||
|
# NetBSD specific stuff
|
||||||
|
BOOT+= devdb swap-blk ttys wscons
|
||||||
|
endif
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
BOOT+= hostid newsyslog savecore syslogd swap-blk
|
|
@ -1,5 +0,0 @@
|
|||||||
# Generic BSD stuff
|
|
||||||
BOOT+= hostid net.lo0 newsyslog savecore syslogd
|
|
||||||
|
|
||||||
# FreeBSD specific stuff
|
|
||||||
BOOT+= adjkerntz dumpon syscons
|
|
@ -1,3 +0,0 @@
|
|||||||
SYSINIT+= devfs dmesg
|
|
||||||
BOOT+= hwclock keymaps modules mtab procfs termencoding
|
|
||||||
SHUTDOWN+= killprocs mount-ro
|
|
@ -1,5 +0,0 @@
|
|||||||
# Generic BSD stuff
|
|
||||||
BOOT+= hostid net.lo0 newsyslog savecore syslogd
|
|
||||||
|
|
||||||
# NetBSD specific stuff
|
|
||||||
BOOT+= devdb swap-blk ttys wscons
|
|
28
sh/Makefile
28
sh/Makefile
@ -8,7 +8,33 @@ INSTALLAFTER= _installafter
|
|||||||
|
|
||||||
MK= ../mk
|
MK= ../mk
|
||||||
include ${MK}/os.mk
|
include ${MK}/os.mk
|
||||||
include Makefile.${OS}
|
|
||||||
|
ifeq ($(OS),FreeBSD)
|
||||||
|
SRCS+= init.sh.in
|
||||||
|
|
||||||
|
.SUFFIXES: .sh.BSD.in
|
||||||
|
.sh.BSD.in.sh:
|
||||||
|
${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@
|
||||||
|
|
||||||
|
else ifeq ($(OS),Linux)
|
||||||
|
SRCS+= init.sh.in init-early.sh.in udhcpc-hook.sh.in
|
||||||
|
BIN+= init-early.sh udhcpc-hook.sh
|
||||||
|
|
||||||
|
.SUFFIXES: .sh.Linux.in
|
||||||
|
.sh.Linux.in.sh:
|
||||||
|
${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@
|
||||||
|
|
||||||
|
else ifeq ($(OS),NetBSD)
|
||||||
|
SRCS+= init.sh.in
|
||||||
|
|
||||||
|
SRCS+= ifwatchd-carrier.sh.in ifwatchd-nocarrier.sh.in
|
||||||
|
BIN+= ifwatchd-carrier.sh ifwatchd-nocarrier.sh
|
||||||
|
|
||||||
|
.SUFFIXES: .sh.BSD.in
|
||||||
|
.sh.BSD.in.sh:
|
||||||
|
${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@
|
||||||
|
endif
|
||||||
|
|
||||||
include ${MK}/scripts.mk
|
include ${MK}/scripts.mk
|
||||||
|
|
||||||
_installafter:
|
_installafter:
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
SRCS+= init.sh.in
|
|
||||||
|
|
||||||
.SUFFIXES: .sh.BSD.in
|
|
||||||
.sh.BSD.in.sh:
|
|
||||||
${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
|||||||
SRCS+= init.sh.in init-early.sh.in udhcpc-hook.sh.in
|
|
||||||
BIN+= init-early.sh udhcpc-hook.sh
|
|
||||||
|
|
||||||
.SUFFIXES: .sh.Linux.in
|
|
||||||
.sh.Linux.in.sh:
|
|
||||||
${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
|||||||
SRCS+= init.sh.in
|
|
||||||
|
|
||||||
SRCS+= ifwatchd-carrier.sh.in ifwatchd-nocarrier.sh.in
|
|
||||||
BIN+= ifwatchd-carrier.sh ifwatchd-nocarrier.sh
|
|
||||||
|
|
||||||
.SUFFIXES: .sh.BSD.in
|
|
||||||
.sh.BSD.in.sh:
|
|
||||||
${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@
|
|
Loading…
Reference in New Issue
Block a user