diff options
author | Xavier Leroy <xavier.leroy@college-de-france.fr> | 2020-11-14 10:09:34 +0100 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@college-de-france.fr> | 2020-11-14 10:18:00 +0100 |
commit | 27beb944ff6ff18ea612c116e414eb40ce1320a6 (patch) | |
tree | 0f8404d343ac7c95ed3351053984f8fda6f8e703 /Makefile.extr | |
parent | e87f24575e79e7866b132f0a970cf6f82d115b88 (diff) | |
download | compcert-kvx-27beb944ff6ff18ea612c116e414eb40ce1320a6.tar.gz compcert-kvx-27beb944ff6ff18ea612c116e414eb40ce1320a6.zip |
Do not use -warn-error when building from a release tarball
Stopping on warnings is useful for development builds, but unhelpful
for released software.
Diffstat (limited to 'Makefile.extr')
-rw-r--r-- | Makefile.extr | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile.extr b/Makefile.extr index b417945b..23e01614 100644 --- a/Makefile.extr +++ b/Makefile.extr @@ -50,13 +50,20 @@ INCLUDES=$(patsubst %,-I %, $(DIRS)) # Control of warnings: -WARNINGS=-w +a-4-9-27 -strict-sequence -safe-string -warn-error +a #Deprication returns with ocaml 4.03 +WARNINGS=-w +a-4-9-27 extraction/%.cmx: WARNINGS +=-w -20-27-32..34-39-41-44..45-60-67 extraction/%.cmo: WARNINGS +=-w -20-27-32..34-39-41-44..45-60-67 cparser/pre_parser.cmx: WARNINGS += -w -41 cparser/pre_parser.cmo: WARNINGS += -w -41 -COMPFLAGS+=-g $(INCLUDES) -I "$(MENHIR_DIR)" $(WARNINGS) +# Turn warnings into errors, but not for released tarballs +ifeq ($(wildcard .git),.git) +WARN_ERRORS=-warn-error +a +else +WARN_ERRORS= +endif + +COMPFLAGS+=-g -strict-sequence -safe-string $(INCLUDES) -I "$(MENHIR_DIR)" $(WARNINGS) $(WARN_ERRORS) # Using .opt compilers if available |