summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2011-02-02 18:18:55 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2011-02-04 22:30:30 -0600
commitdb6d680765b4b9a4d404f6b2e6d5644b2fe3418d (patch)
tree21986fb2b800f6dc0ddab04dc982b827d3a74e4e
parenta2e9cde737ede93502a80fe50e62b0aea50643dc (diff)
downloadopenrc-db6d680765b4b9a4d404f6b2e6d5644b2fe3418d.tar.gz
openrc-db6d680765b4b9a4d404f6b2e6d5644b2fe3418d.tar.bz2
openrc-db6d680765b4b9a4d404f6b2e6d5644b2fe3418d.tar.xz
rework pam, ncurses and termcap include files
This allows error checking inside the included files instead of either including the appropriate file or a blank file. Also the blank file named .mk gets removed by this change.
-rw-r--r--mk/.mk0
-rw-r--r--mk/ncurses.mk3
-rw-r--r--mk/pam.mk4
-rw-r--r--mk/termcap.mk8
-rw-r--r--src/libeinfo/Makefile2
-rw-r--r--src/rc/Makefile4
6 files changed, 15 insertions, 6 deletions
diff --git a/mk/.mk b/mk/.mk
deleted file mode 100644
index e69de29..0000000
--- a/mk/.mk
+++ /dev/null
diff --git a/mk/ncurses.mk b/mk/ncurses.mk
deleted file mode 100644
index d93e8fb..0000000
--- a/mk/ncurses.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-LIBTERMCAP?= -lncurses
-CPPFLAGS+= -DHAVE_TERMCAP
-LDADD+= ${LIBTERMCAP}
diff --git a/mk/pam.mk b/mk/pam.mk
index 65115d5..15ffb54 100644
--- a/mk/pam.mk
+++ b/mk/pam.mk
@@ -1,6 +1,10 @@
+ifeq (${MKPAM},pam)
LIBPAM?= -lpam
CPPFLAGS+= -DHAVE_PAM
LDADD+= ${LIBPAM}
PAMDIR?= /etc/pam.d
PAMMODE?= 0644
+else ifneq (${MKPAM},)
+$(error if MKPAM is defined, it must be "pam")
+endif
diff --git a/mk/termcap.mk b/mk/termcap.mk
index 7a603e3..b716276 100644
--- a/mk/termcap.mk
+++ b/mk/termcap.mk
@@ -1,3 +1,11 @@
+ifeq (${MKTERMCAP},ncurses)
+LIBTERMCAP?= -lncurses
+CPPFLAGS+= -DHAVE_TERMCAP
+LDADD+= ${LIBTERMCAP}
+else ifeq (${MKTERMCAP},termcap)
LIBTERMCAP?= -ltermcap
CPPFLAGS+= -DHAVE_TERMCAP
LDADD+= ${LIBTERMCAP}
+else ifneq (${MKTERMCAP},)
+$(error If MKTERMCAP is defined, it must be ncurses or termcap)
+endif
diff --git a/src/libeinfo/Makefile b/src/libeinfo/Makefile
index 1569f8f..b93b5e5 100644
--- a/src/libeinfo/Makefile
+++ b/src/libeinfo/Makefile
@@ -10,4 +10,4 @@ MK= ../../mk
include ${MK}/lib.mk
include ${MK}/cc.mk
include ${MK}/debug.mk
-include ${MK}/${MKTERMCAP}.mk
+include ${MK}/termcap.mk
diff --git a/src/rc/Makefile b/src/rc/Makefile
index ca71b4a..cf63cca 100644
--- a/src/rc/Makefile
+++ b/src/rc/Makefile
@@ -41,9 +41,9 @@ include ${MK}/prog.mk
include ${MK}/git.mk
include ${MK}/cc.mk
-include ${MK}/${MKTERMCAP}.mk
+include ${MK}/termcap.mk
LDADD+= ${LIBDL} ${LIBKVM}
-include ${MK}/${MKPAM}.mk
+include ${MK}/pam.mk
# create symlinks to rc if not an SELINUX system, otherwise create a wrapper
# script to call rc with the proper name of the applet to execute.