Skip to content

Commit 27beb94

Browse files
committed
Do not use -warn-error when building from a release tarball
Stopping on warnings is useful for development builds, but unhelpful for released software.
1 parent e87f245 commit 27beb94

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Makefile.extr

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,20 @@ INCLUDES=$(patsubst %,-I %, $(DIRS))
5050

5151
# Control of warnings:
5252

53-
WARNINGS=-w +a-4-9-27 -strict-sequence -safe-string -warn-error +a #Deprication returns with ocaml 4.03
53+
WARNINGS=-w +a-4-9-27
5454
extraction/%.cmx: WARNINGS +=-w -20-27-32..34-39-41-44..45-60-67
5555
extraction/%.cmo: WARNINGS +=-w -20-27-32..34-39-41-44..45-60-67
5656
cparser/pre_parser.cmx: WARNINGS += -w -41
5757
cparser/pre_parser.cmo: WARNINGS += -w -41
5858

59-
COMPFLAGS+=-g $(INCLUDES) -I "$(MENHIR_DIR)" $(WARNINGS)
59+
# Turn warnings into errors, but not for released tarballs
60+
ifeq ($(wildcard .git),.git)
61+
WARN_ERRORS=-warn-error +a
62+
else
63+
WARN_ERRORS=
64+
endif
65+
66+
COMPFLAGS+=-g -strict-sequence -safe-string $(INCLUDES) -I "$(MENHIR_DIR)" $(WARNINGS) $(WARN_ERRORS)
6067

6168
# Using .opt compilers if available
6269

0 commit comments

Comments
 (0)