summaryrefslogtreecommitdiff
path: root/yacc
diff options
context:
space:
mode:
authorSébastien Hinderer <Sebastien.Hinderer@inria.fr>2017-03-16 10:21:00 +0100
committerSébastien Hinderer <Sebastien.Hinderer@inria.fr>2017-03-29 11:10:06 +0200
commitf2d5d60376096c241fb0e9679f933750e5401cee (patch)
tree57f1dff35cd2ec635c84a8c86d6d8cfc66fec726 /yacc
parent3262da1839af92b076c84e8a65636650f38dcd09 (diff)
downloadocaml-f2d5d60376096c241fb0e9679f933750e5401cee.tar.gz
Define new build variables for C compiler and preprocessor flags
Diffstat (limited to 'yacc')
-rw-r--r--yacc/Makefile4
-rw-r--r--yacc/defs.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/yacc/Makefile b/yacc/Makefile
index c4bdae6be5..fbdf2ab577 100644
--- a/yacc/Makefile
+++ b/yacc/Makefile
@@ -17,8 +17,6 @@
include ../config/Makefile
-CFLAGS=$(BYTECFLAGS) -DNDEBUG $(BYTECCCOMPOPTS)
-
OBJS= closure.$(O) error.$(O) lalr.$(O) lr0.$(O) main.$(O) \
mkpar.$(O) output.$(O) reader.$(O) \
skeleton.$(O) symtab.$(O) verbose.$(O) warshall.$(O)
@@ -53,4 +51,4 @@ warshall.$(O): defs.h
# also works for .obj files.
%.$(O): %.c
- $(CC) $(CFLAGS) -c $<
+ $(CC) -c $(CFLAGS) $(CPPFLAGS) $<
diff --git a/yacc/defs.h b/yacc/defs.h
index 8377d05de5..075aee222f 100644
--- a/yacc/defs.h
+++ b/yacc/defs.h
@@ -15,6 +15,10 @@
/* Based on public-domain code from Berkeley Yacc */
+#ifndef DEBUG
+#define NDEBUG
+#endif
+
#include <assert.h>
#include <ctype.h>
#include <errno.h>