Project

General

Profile

« Previous | Next » 

Revision c80e92d1

Added by Pierre-Loïc Garoche almost 6 years ago

Solving a warning with ocaml 4.04 and uppercase_ascii. Provides backward compatibility for 4.02

View differences:

Makefile.in
45 45

  
46 46
dist-src-clean: clean
47 47
	@rm -f config.log config.status include/*.lusic include/lustrec_math.h include/simulink_math_fcn.h include/conv.h include/mpfr_lustre.h
48
	@rm -f Makefile ./src/Makefile ./src/pluginList.ml ./src/version.ml ./src/_tags
48
	@rm -f Makefile ./src/Makefile ./src/pluginList.ml ./src/version.ml ./src/_tags ./src/ocaml_utils.ml
49 49

  
50 50
DIST_ARCHIVE_NAME=lustrec-$(shell $(LOCAL_BINDIR)/lustrec -version | grep version | cut -d, -f 2 | sed -e "s/ version //" -e "s/ (/-/" -e "s/ /-/" -e "s/\//-/" -e "s/)//")-src.tar.gz
51 51

  
configure.ac
22 22

  
23 23
AC_PATH_PROG([OCAMLBUILD],[ocamlbuild],[:])
24 24

  
25
# Handle a mismatch in available function btw 4.02 and 4.04
26
if (test $"$major" -eq 4 -a "$minor" -gt 2); then
27
   AC_SUBST(UPPERCASEFUN, "String.uppercase_ascii")
28
else
29
   AC_SUBST(UPPERCASEFUN, "String.uppercase")
30
fi
25 31

  
26 32
# default prefix is /usr/local
27 33
AC_PREFIX_DEFAULT(/usr/local)
......
138 144
		 src/version.ml
139 145
		 src/pluginList.ml
140 146
		 src/_tags
147
		 src/ocaml_utils.ml
141 148
		 ])
142 149

  
143 150
AC_OUTPUT
src/backends/C/c_backend_common.ml
24 24
    (if !Options.mpfr then "MPFR multi-precision" else "(double) floating-point")
25 25

  
26 26
let file_to_module_name basename =
27
  let baseNAME = String.uppercase_ascii basename in
27
  let baseNAME = Ocaml_utils.uppercase basename in
28 28
  let baseNAME = Str.global_replace (Str.regexp "\\.\\|\\ ") "_" baseNAME in
29 29
  baseNAME
30 30

  
src/ocaml_utils.ml.in
1
let uppercase = @UPPERCASEFUN@

Also available in: Unified diff