summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pttbbs/mbbsd/Makefile10
-rw-r--r--pttbbs/pttbbs.mk4
2 files changed, 8 insertions, 6 deletions
diff --git a/pttbbs/mbbsd/Makefile b/pttbbs/mbbsd/Makefile
index 8c196d26..9cfe7e14 100644
--- a/pttbbs/mbbsd/Makefile
+++ b/pttbbs/mbbsd/Makefile
@@ -53,10 +53,12 @@ LDLIBS+= -lcmbbs -lcmsys -losdep
BBSCONF:= $(SRCROOT)/pttbbs.conf
DEF_PATTERN:= ^[ \t]*\#[ \t]*define[ \t]*
-USE_BBSLUA!= sh -c 'grep -Ew "${DEF_PATTERN}USE_BBSLUA" ${BBSCONF} || true'
-USE_PFTERM!= sh -c 'grep -Ew "${DEF_PATTERN}USE_PFTERM" ${BBSCONF} || true'
-USE_NIOS!= sh -c 'grep -Ew "${DEF_PATTERN}USE_NIOS" ${BBSCONF} || true'
-USE_CONVERT!= sh -c 'grep -Ew "${DEF_PATTERN}CONVERT" ${BBSCONF} || true'
+DEF_CMD:= grep -Ewq "${DEF_PATTERN}"
+DEF_YES:= && echo "YES" || echo ""
+USE_BBSLUA!= sh -c '${DEF_CMD}"USE_BBSLUA" ${BBSCONF} ${DEF_YES}'
+USE_PFTERM!= sh -c '${DEF_CMD}"USE_PFTERM" ${BBSCONF} ${DEF_YES}'
+USE_NIOS!= sh -c '${DEF_CMD}"USE_NIOS" ${BBSCONF} ${DEF_YES}'
+USE_CONVERT!= sh -c '${DEF_CMD}"CONVERT" ${BBSCONF} ${DEF_YES}'
.if $(USE_BBSLUA)
.if $(OSTYPE)=="FreeBSD"
diff --git a/pttbbs/pttbbs.mk b/pttbbs/pttbbs.mk
index cb50eec1..5701f647 100644
--- a/pttbbs/pttbbs.mk
+++ b/pttbbs/pttbbs.mk
@@ -11,8 +11,8 @@ OSTYPE!= uname
CC:= gcc
CXX:= g++
-CLANG!= sh -c 'type clang'
-CCACHE!= sh -c 'type ccache'
+CLANG!= sh -c 'type clang 2>/dev/null || echo ""'
+CCACHE!= sh -c 'type ccache 2>/dev/null || echo ""'
.if $(CLANG)
CC:= clang