1 |
commit: db6d680765b4b9a4d404f6b2e6d5644b2fe3418d |
2 |
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Feb 3 00:18:55 2011 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 5 04:30:30 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=db6d6807 |
7 |
|
8 |
rework pam, ncurses and termcap include files |
9 |
|
10 |
This allows error checking inside the included files instead of either |
11 |
including the appropriate file or a blank file. |
12 |
|
13 |
Also the blank file named .mk gets removed by this change. |
14 |
|
15 |
--- |
16 |
mk/ncurses.mk | 3 --- |
17 |
mk/pam.mk | 4 ++++ |
18 |
mk/termcap.mk | 8 ++++++++ |
19 |
src/libeinfo/Makefile | 2 +- |
20 |
src/rc/Makefile | 4 ++-- |
21 |
5 files changed, 15 insertions(+), 6 deletions(-) |
22 |
|
23 |
diff --git a/mk/.mk b/mk/.mk |
24 |
deleted file mode 100644 |
25 |
index e69de29..0000000 |
26 |
|
27 |
diff --git a/mk/ncurses.mk b/mk/ncurses.mk |
28 |
deleted file mode 100644 |
29 |
index d93e8fb..0000000 |
30 |
--- a/mk/ncurses.mk |
31 |
+++ /dev/null |
32 |
@@ -1,3 +0,0 @@ |
33 |
-LIBTERMCAP?= -lncurses |
34 |
-CPPFLAGS+= -DHAVE_TERMCAP |
35 |
-LDADD+= ${LIBTERMCAP} |
36 |
|
37 |
diff --git a/mk/pam.mk b/mk/pam.mk |
38 |
index 65115d5..15ffb54 100644 |
39 |
--- a/mk/pam.mk |
40 |
+++ b/mk/pam.mk |
41 |
@@ -1,6 +1,10 @@ |
42 |
+ifeq (${MKPAM},pam) |
43 |
LIBPAM?= -lpam |
44 |
CPPFLAGS+= -DHAVE_PAM |
45 |
LDADD+= ${LIBPAM} |
46 |
|
47 |
PAMDIR?= /etc/pam.d |
48 |
PAMMODE?= 0644 |
49 |
+else ifneq (${MKPAM},) |
50 |
+$(error if MKPAM is defined, it must be "pam") |
51 |
+endif |
52 |
|
53 |
diff --git a/mk/termcap.mk b/mk/termcap.mk |
54 |
index 7a603e3..b716276 100644 |
55 |
--- a/mk/termcap.mk |
56 |
+++ b/mk/termcap.mk |
57 |
@@ -1,3 +1,11 @@ |
58 |
+ifeq (${MKTERMCAP},ncurses) |
59 |
+LIBTERMCAP?= -lncurses |
60 |
+CPPFLAGS+= -DHAVE_TERMCAP |
61 |
+LDADD+= ${LIBTERMCAP} |
62 |
+else ifeq (${MKTERMCAP},termcap) |
63 |
LIBTERMCAP?= -ltermcap |
64 |
CPPFLAGS+= -DHAVE_TERMCAP |
65 |
LDADD+= ${LIBTERMCAP} |
66 |
+else ifneq (${MKTERMCAP},) |
67 |
+$(error If MKTERMCAP is defined, it must be ncurses or termcap) |
68 |
+endif |
69 |
|
70 |
diff --git a/src/libeinfo/Makefile b/src/libeinfo/Makefile |
71 |
index 1569f8f..b93b5e5 100644 |
72 |
--- a/src/libeinfo/Makefile |
73 |
+++ b/src/libeinfo/Makefile |
74 |
@@ -10,4 +10,4 @@ MK= ../../mk |
75 |
include ${MK}/lib.mk |
76 |
include ${MK}/cc.mk |
77 |
include ${MK}/debug.mk |
78 |
-include ${MK}/${MKTERMCAP}.mk |
79 |
+include ${MK}/termcap.mk |
80 |
|
81 |
diff --git a/src/rc/Makefile b/src/rc/Makefile |
82 |
index ca71b4a..cf63cca 100644 |
83 |
--- a/src/rc/Makefile |
84 |
+++ b/src/rc/Makefile |
85 |
@@ -41,9 +41,9 @@ include ${MK}/prog.mk |
86 |
include ${MK}/git.mk |
87 |
include ${MK}/cc.mk |
88 |
|
89 |
-include ${MK}/${MKTERMCAP}.mk |
90 |
+include ${MK}/termcap.mk |
91 |
LDADD+= ${LIBDL} ${LIBKVM} |
92 |
-include ${MK}/${MKPAM}.mk |
93 |
+include ${MK}/pam.mk |
94 |
|
95 |
# create symlinks to rc if not an SELINUX system, otherwise create a wrapper |
96 |
# script to call rc with the proper name of the applet to execute. |