summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2012-04-14 16:44:13 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2012-04-14 16:44:13 +0800
commit8b7e9eca1043b8f41168cb14dba1d7955928f010 (patch)
tree3901c5c931d1ab0612ed6a355621771c023009b4
parent0631eb69d905b46b3af1f6400828e58271f472c8 (diff)
downloadpttbbs-8b7e9eca1043b8f41168cb14dba1d7955928f010.tar
pttbbs-8b7e9eca1043b8f41168cb14dba1d7955928f010.tar.gz
pttbbs-8b7e9eca1043b8f41168cb14dba1d7955928f010.tar.bz2
pttbbs-8b7e9eca1043b8f41168cb14dba1d7955928f010.tar.lz
pttbbs-8b7e9eca1043b8f41168cb14dba1d7955928f010.tar.xz
pttbbs-8b7e9eca1043b8f41168cb14dba1d7955928f010.tar.zst
pttbbs-8b7e9eca1043b8f41168cb14dba1d7955928f010.zip
Fix makefile when using pmake.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5641 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-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