aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2011-10-17 20:18:39 -0500
committerWilliam Hubbs <williamh@gentoo.org>2011-10-18 03:23:00 -0500
commitecf77254bbacf5b53d940a738ea6cdc569a28958 (patch)
tree22d9f6ec6b4882311917fe8d629c24c446bdec9d
parent9f95878bbd5461837b00b5ea2134768302776584 (diff)
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
-rw-r--r--conf.d/Makefile11
-rw-r--r--conf.d/Makefile.FreeBSD1
-rw-r--r--conf.d/Makefile.Linux2
-rw-r--r--conf.d/Makefile.NetBSD1
-rw-r--r--doc/Makefile22
-rw-r--r--doc/Makefile.FreeBSD5
-rw-r--r--doc/Makefile.Linux5
-rw-r--r--doc/Makefile.NetBSD5
-rw-r--r--etc/Makefile16
-rw-r--r--etc/Makefile.FreeBSD4
-rw-r--r--etc/Makefile.Linux2
-rw-r--r--etc/Makefile.NetBSD3
-rw-r--r--init.d.misc/Makefile9
-rw-r--r--init.d.misc/Makefile.FreeBSD1
-rw-r--r--init.d.misc/Makefile.Linux1
-rw-r--r--init.d.misc/Makefile.NetBSD1
-rw-r--r--init.d/Makefile41
-rw-r--r--init.d/Makefile.FreeBSD13
-rw-r--r--init.d/Makefile.Linux9
-rw-r--r--init.d/Makefile.NetBSD12
-rw-r--r--net/Makefile27
-rw-r--r--net/Makefile.FreeBSD6
-rw-r--r--net/Makefile.Linux9
-rw-r--r--net/Makefile.NetBSD5
-rw-r--r--runlevels/Makefile21
-rw-r--r--runlevels/Makefile.BSD1
-rw-r--r--runlevels/Makefile.FreeBSD5
-rw-r--r--runlevels/Makefile.Linux3
-rw-r--r--runlevels/Makefile.NetBSD5
-rw-r--r--sh/Makefile28
-rw-r--r--sh/Makefile.FreeBSD6
-rw-r--r--sh/Makefile.Linux7
-rw-r--r--sh/Makefile.NetBSD8
33 files changed, 167 insertions, 128 deletions
diff --git a/conf.d/Makefile b/conf.d/Makefile
index 374bfdb7..817f60e2 100644
--- a/conf.d/Makefile
+++ b/conf.d/Makefile
@@ -6,7 +6,16 @@ CLEANFILES+= network staticroute
MK= ../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
SOS?= BSD
diff --git a/conf.d/Makefile.FreeBSD b/conf.d/Makefile.FreeBSD
deleted file mode 100644
index c43a1d4f..00000000
--- a/conf.d/Makefile.FreeBSD
+++ /dev/null
@@ -1 +0,0 @@
-CONF+= ipfw moused powerd rarpd savecore syscons
diff --git a/conf.d/Makefile.Linux b/conf.d/Makefile.Linux
deleted file mode 100644
index 369b3dff..00000000
--- a/conf.d/Makefile.Linux
+++ /dev/null
@@ -1,2 +0,0 @@
-CONF+= consolefont dmesg hwclock keymaps killprocs modules
-SOS= Linux
diff --git a/conf.d/Makefile.NetBSD b/conf.d/Makefile.NetBSD
deleted file mode 100644
index 18a52cce..00000000
--- a/conf.d/Makefile.NetBSD
+++ /dev/null
@@ -1 +0,0 @@
-CONF+= moused rarpd savecore
diff --git a/doc/Makefile b/doc/Makefile
index b4dd962b..8f6930a2 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -3,5 +3,25 @@ INC= net.example
MK= ../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
diff --git a/doc/Makefile.FreeBSD b/doc/Makefile.FreeBSD
deleted file mode 100644
index a21536b1..00000000
--- a/doc/Makefile.FreeBSD
+++ /dev/null
@@ -1,5 +0,0 @@
-SRCS+= net.example.in
-
-.SUFFIXES: .BSD.in
-.BSD.in:
- ${CP} $< $@
diff --git a/doc/Makefile.Linux b/doc/Makefile.Linux
deleted file mode 100644
index 405f7ea9..00000000
--- a/doc/Makefile.Linux
+++ /dev/null
@@ -1,5 +0,0 @@
-SRCS+= net.example.in
-
-.SUFFIXES: .Linux.in
-.Linux.in:
- ${CP} $< $@
diff --git a/doc/Makefile.NetBSD b/doc/Makefile.NetBSD
deleted file mode 100644
index a21536b1..00000000
--- a/doc/Makefile.NetBSD
+++ /dev/null
@@ -1,5 +0,0 @@
-SRCS+= net.example.in
-
-.SUFFIXES: .BSD.in
-.BSD.in:
- ${CP} $< $@
diff --git a/etc/Makefile b/etc/Makefile
index 314225a8..4f913add 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -5,7 +5,21 @@ CLEANFILES+= rc.conf
MK= ../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
# We can't use "ifndef" here because that treats set-but-empty
diff --git a/etc/Makefile.FreeBSD b/etc/Makefile.FreeBSD
deleted file mode 100644
index 6de74510..00000000
--- a/etc/Makefile.FreeBSD
+++ /dev/null
@@ -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
diff --git a/etc/Makefile.Linux b/etc/Makefile.Linux
deleted file mode 100644
index 5b562947..00000000
--- a/etc/Makefile.Linux
+++ /dev/null
@@ -1,2 +0,0 @@
-SED_EXTRA= -e 's:@TERM@:wsvt25:g'
-SRCS+= rc.conf.in rc.in rc.shutdown.in
diff --git a/etc/Makefile.NetBSD b/etc/Makefile.NetBSD
deleted file mode 100644
index 0e85dd4e..00000000
--- a/etc/Makefile.NetBSD
+++ /dev/null
@@ -1,3 +0,0 @@
-SED_EXTRA= -e 's:@TERM@:wsvt25:g'
-SRCS+= rc.conf.in rc.in rc.shutdown.in
-BIN+= rc rc.shutdown
diff --git a/init.d.misc/Makefile b/init.d.misc/Makefile
index 2b2a51ba..b44063cc 100644
--- a/init.d.misc/Makefile
+++ b/init.d.misc/Makefile
@@ -8,4 +8,11 @@ MK= ../mk
SED_EXTRA+= -e 's:@VARBASE@:/var:g'
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
diff --git a/init.d.misc/Makefile.FreeBSD b/init.d.misc/Makefile.FreeBSD
deleted file mode 100644
index 031049d2..00000000
--- a/init.d.misc/Makefile.FreeBSD
+++ /dev/null
@@ -1 +0,0 @@
-PKG_PREFIX?= /usr/local
diff --git a/init.d.misc/Makefile.Linux b/init.d.misc/Makefile.Linux
deleted file mode 100644
index e280d766..00000000
--- a/init.d.misc/Makefile.Linux
+++ /dev/null
@@ -1 +0,0 @@
-PKG_PREFIX?=/usr
diff --git a/init.d.misc/Makefile.NetBSD b/init.d.misc/Makefile.NetBSD
deleted file mode 100644
index 73fc2b7d..00000000
--- a/init.d.misc/Makefile.NetBSD
+++ /dev/null
@@ -1 +0,0 @@
-PKG_PREFIX?= /usr/pkg
diff --git a/init.d/Makefile b/init.d/Makefile
index b7490d38..5fd33310 100644
--- a/init.d/Makefile
+++ b/init.d/Makefile
@@ -16,7 +16,46 @@ TARGETS+= ${_NET_LO}
MK= ../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
_installafter_: realinstall
diff --git a/init.d/Makefile.FreeBSD b/init.d/Makefile.FreeBSD
deleted file mode 100644
index 3cd6feb6..00000000
--- a/init.d/Makefile.FreeBSD
+++ /dev/null
@@ -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} $< > $@
diff --git a/init.d/Makefile.Linux b/init.d/Makefile.Linux
deleted file mode 100644
index 5e574264..00000000
--- a/init.d/Makefile.Linux
+++ /dev/null
@@ -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} $< > $@
diff --git a/init.d/Makefile.NetBSD b/init.d/Makefile.NetBSD
deleted file mode 100644
index 60fd09c2..00000000
--- a/init.d/Makefile.NetBSD
+++ /dev/null
@@ -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} $< > $@
diff --git a/net/Makefile b/net/Makefile
index 5cba7eb0..af5f6e2e 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -5,5 +5,30 @@ INC= dhclient.sh dhcpcd.sh ifconfig.sh macchanger.sh macnet.sh \
MK= ../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
diff --git a/net/Makefile.FreeBSD b/net/Makefile.FreeBSD
deleted file mode 100644
index 1a661db2..00000000
--- a/net/Makefile.FreeBSD
+++ /dev/null
@@ -1,6 +0,0 @@
-SRCS+= iwconfig.sh.in
-INC+= iwconfig.sh
-
-.SUFFIXES: .sh.BSD.in
-.sh.BSD.in.sh:
- ${CP} $< $@
diff --git a/net/Makefile.Linux b/net/Makefile.Linux
deleted file mode 100644
index f7fb0870..00000000
--- a/net/Makefile.Linux
+++ /dev/null
@@ -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} $< $@
diff --git a/net/Makefile.NetBSD b/net/Makefile.NetBSD
deleted file mode 100644
index 396bf9f5..00000000
--- a/net/Makefile.NetBSD
+++ /dev/null
@@ -1,5 +0,0 @@
-INC+= ifwatchd.sh
-
-.SUFFIXES: .sh.BSD.in
-.sh.BSD.in.sh:
- ${CP} $< $@
diff --git a/runlevels/Makefile b/runlevels/Makefile
index ae4fff1d..782638b2 100644
--- a/runlevels/Makefile
+++ b/runlevels/Makefile
@@ -15,7 +15,26 @@ MK= ../mk
include ${MK}/sys.mk
include ${MK}/os.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:
diff --git a/runlevels/Makefile.BSD b/runlevels/Makefile.BSD
deleted file mode 100644
index ffa758c1..00000000
--- a/runlevels/Makefile.BSD
+++ /dev/null
@@ -1 +0,0 @@
-BOOT+= hostid newsyslog savecore syslogd swap-blk
diff --git a/runlevels/Makefile.FreeBSD b/runlevels/Makefile.FreeBSD
deleted file mode 100644
index 614e965b..00000000
--- a/runlevels/Makefile.FreeBSD
+++ /dev/null
@@ -1,5 +0,0 @@
-# Generic BSD stuff
-BOOT+= hostid net.lo0 newsyslog savecore syslogd
-
-# FreeBSD specific stuff
-BOOT+= adjkerntz dumpon syscons
diff --git a/runlevels/Makefile.Linux b/runlevels/Makefile.Linux
deleted file mode 100644
index 251c6b8b..00000000
--- a/runlevels/Makefile.Linux
+++ /dev/null
@@ -1,3 +0,0 @@
-SYSINIT+= devfs dmesg
-BOOT+= hwclock keymaps modules mtab procfs termencoding
-SHUTDOWN+= killprocs mount-ro
diff --git a/runlevels/Makefile.NetBSD b/runlevels/Makefile.NetBSD
deleted file mode 100644
index d76ccea6..00000000
--- a/runlevels/Makefile.NetBSD
+++ /dev/null
@@ -1,5 +0,0 @@
-# Generic BSD stuff
-BOOT+= hostid net.lo0 newsyslog savecore syslogd
-
-# NetBSD specific stuff
-BOOT+= devdb swap-blk ttys wscons
diff --git a/sh/Makefile b/sh/Makefile
index 73d46418..72df96a5 100644
--- a/sh/Makefile
+++ b/sh/Makefile
@@ -8,7 +8,33 @@ INSTALLAFTER= _installafter
MK= ../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
_installafter:
diff --git a/sh/Makefile.FreeBSD b/sh/Makefile.FreeBSD
deleted file mode 100644
index d4e6b866..00000000
--- a/sh/Makefile.FreeBSD
+++ /dev/null
@@ -1,6 +0,0 @@
-SRCS+= init.sh.in
-
-.SUFFIXES: .sh.BSD.in
-.sh.BSD.in.sh:
- ${SED} ${SED_REPLACE} ${SED_EXTRA} $< > $@
-
diff --git a/sh/Makefile.Linux b/sh/Makefile.Linux
deleted file mode 100644
index fb9208c4..00000000
--- a/sh/Makefile.Linux
+++ /dev/null
@@ -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} $< > $@
-
diff --git a/sh/Makefile.NetBSD b/sh/Makefile.NetBSD
deleted file mode 100644
index bd443934..00000000
--- a/sh/Makefile.NetBSD
+++ /dev/null
@@ -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} $< > $@