Commit Graph

59 Commits (be7a0310a249df1fe728e7caf47effdf0e9fdbed)

Author SHA1 Message Date
Wojciech Meyer 49a8d15728 build: skip $(IFLEXDIR) in mk_shell_and_ocamlbuild_config.sh.
(Patch by Adrien Nader!)

On Windows, IFLEXDIR is defined as -I"$(FLEXDIR)". The new
mk_shell_and_ocamlbuild_config script outputs:
  echo IFLEXDIR="\"$(IFLEXDIR)\""

However, becauses $(IFLEXDIR) contains quotation marks, this becomes:
  echo IFLEXDIR="\"-I"$(FLEXDIR)"\""

This unquotes $(FLEXDIR) and breaks the program.

Simply exclude IFLEXDIR from the variables that are handled by the
script. This is actually what the previous scripts were doing: the
exclude list was .*FLEXDIR and matched both IFLEXDIR and FLEXDIR while
the one I made only had \<FLEXDIR\> in it.

I've tried to handle it but there are at least three competing languages
and quoting rules: makefile (both gnu make and several bsd makes), shell
script and ocaml.
There's no human way to do string processing given the portability
constraints: both gnu make and pmake (and its descendants) have powerful
string processing functions but they're not the same.
The only sane way would be to store the configuration in a more evolved
language that is portable, has arrays and powerful string handling
routines in standard like C or awk. From there it would be possible to
output make, shell script and OCaml code easily.

One day. Maybe.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14171 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-21 10:24:34 +00:00
Wojciech Meyer 241585bc83 build: replace ocamlcomp*.sh.
This script was built from ocamlcomp.sh.in through sed and is called
instead of "ocamlc" (for instance).
It makes it possible to switch from "ocamlc" to "ocamlc.opt" without
changing anything in the Makefiles, only calling sed.

I couldn't cleanly make it handle both a compiler for the target and for
the build. Instead I'm replacing it and doing as much as possible
directly in the Makefiles.
I hoped it would reduce the number of shell invocations, which would
speed things up quite a lot on Windows but I still had to have at least
one since it's not possible to update a make variable from inside a make
rule: i.e. it's not possible to do X=a, build a.opt and update X to be
a.opt.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14168 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-20 00:22:38 +00:00
Wojciech Meyer 8104198af7 build: replace build/mk{config,myocamlbuild_config}.sh.
(Patch by Adrien Nader!)

These scripts sed config/Makefile in order to create shell script and
ocaml code that define the same values as the Makefile but in the
corresponding language.
The sed stuff is very difficult to understand, very brittle and
impossible to change.
Remove that altogether and use a Makefile to run commands like
[ echo FOO=$(FOO) ]. There is still some sed involved (to get the list
of variables in the config and to put rewrite the lists into a list of
commands) but much less and all the expressions are put into variables
with meaningful names with lots of comments.

For config.sh, mkconfig.sh generated lines like :
  if [ -z "${FOO}" ]; then FOO=bar; fi
The new script sets the value without checking anything.
I haven't found a reason to do things differently: if there is anything
to override, the right place to do it is after sourcing the shell
script. In any case, I haven't seen any such use.

The mkconfig.sh file also set "WINDOWS=true/false" but the only use is
in the parallel build-system which is implemented in build/ and uses
ocamlbuild as much as possible, and it's going away so it's useless to
set it too.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14167 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-20 00:13:23 +00:00
Gabriel Scherer dbffb7919a use 'mark_tag_used' to solve all "unused tag" warnings in the distribution
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14149 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-15 11:36:54 +00:00
Xavier Clerc e82104a755 Remove labltk from the distribution (will be available as a third-party library).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14077 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-09 09:32:00 +00:00
Gabriel Scherer 5e9836d003 bootstrap myocamlbuild.boot and adapt build/boot.sh
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14028 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-20 16:02:41 +00:00
Gabriel Scherer c3788a5328 Synchronize camlp4-byte-only.sh with camlp4-native-only.sh to avoid camlp4 rebuild
In the commit 13296, the compilation options in camlp4-native-only
where changed to avoid a warning of the compiler. This had the
unfortunate side-effect that ocamlbuild would compile camlp4 twice
(in -byte-only and -native-only) with different options, that is
different checksums, and would therefore rebuild everything each
time. This commit mirrors the change of -native-only.sh
in -byte-only.sh (where, as far as I understand, it should have no
effect, even if it isn't needed as there is no warning to be silenced)
to avoid rebuild.

After this change, when calling "make world.opt", none of camlp4 is
rebuilt (the checksums to check that nothing changed still take
a dozen of seconds).

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13983 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-05 10:27:03 +00:00
Hongbo Zhang 29ad1d3bfd Camlp4Fold/MapGenerator handle abstract type now
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13973 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-05 03:24:29 +00:00
Wojciech Meyer dda5f84f7c build: allow disabling ocamldoc and ocamlbuild.
(Patch by Adrien Nader!)

This doesn't touch the build system in build/ since it's obsolete and
unmaintained as far as I know (I'll try to remove it in a further
commit).

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13943 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-28 15:52:17 +00:00
Wojciech Meyer 0e608bf1b0 PR#5547: Enable the "-use-ocamlfind" option by default
ocamlfind library management has been around for while and is
considered to be installed by default on any OCaml system. Therefore
it's safe to assume that the default behavior of ocamlbuild should be
to use new ocamlfind support normally enabled explicitly by
-use-ocamlfind flag. The -use-ocamlfind flag has now a status of
depreceation and instead new flag -no-ocamlfind causes ocamlbuild to
not try to use new set of parametric tags for supporting ocamlfind.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13938 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-27 00:02:13 +00:00
Hongbo Zhang 72af5c7cd0 fix PR#6062: camlp4 macro parser uncaught exception
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13875 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-07 14:21:35 +00:00
Damien Doligez 6283fee381 testsuite: making it work without installing OCaml (continued)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13690 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-05-17 12:03:58 +00:00
Fabrice Le Fessant 8364a09153 PR#5461: fix warnings 31 in camlp4 compilation
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13296 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-02-18 12:09:06 +00:00
Wojciech Meyer 5e15de8ae1 Fix missing files to be installed for ocamlbuild
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13192 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-01 04:53:49 +00:00
Damien Doligez def31744f9 remove all $Id keywords
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Damien Doligez 6be05dae42 add some missing copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12814 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-08-02 08:17:59 +00:00
Fabrice Le Fessant d39d43e55f merge with branch bin-annot
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12516 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-30 14:52:37 +00:00
Benedikt Meurer 1e0de976fa Don't attempt to install Camlp4 if -no-camlp4 was specified.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12113 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-03 12:03:04 +00:00
Damien Doligez 3b507dd1aa renaming of Objective Caml to OCaml and cleanup of copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-27 14:17:02 +00:00
Damien Doligez 90664f4ea1 uniform .ignore system
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11133 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-20 15:37:36 +00:00
Damien Doligez c91db736b1 merge changes from 3.12.0 to 3.12.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11123 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-20 09:17:07 +00:00
Damien Doligez 575555eecd merge changes from branching of 3.12 to release/3.12.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10643 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-08-02 14:37:22 +00:00
Damien Doligez d9d8ff4749 PR#5041: ocamlbuild needs gnu make
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10449 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-21 11:48:35 +00:00
Nicolas Pouillard 44540cfa4e camlp4: typo
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10427 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-19 12:05:50 +00:00
Nicolas Pouillard fc2dea6d3d Mention the recipe in build/camlp4-bootstrap.sh
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10423 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-19 11:23:14 +00:00
Nicolas Pouillard ac71af0570 Add a recipe to bootstrap camlp4
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10402 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-17 09:52:29 +00:00
Nicolas Pouillard e9c19d4e10 build: cleanup ocamlbuild build scripts
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10385 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-11 13:28:31 +00:00
Damien Doligez 27780d9f8a fixed several build problems
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10298 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-04-22 15:41:16 +00:00
Damien Doligez 04b1656222 clean up spaces and tabs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9547 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-01-22 12:48:24 +00:00
Damien Doligez bdc0fadee2 merge changes from release/3.11.1 to release/3.11.2
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9540 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-01-20 16:26:46 +00:00
Damien Doligez 71b94fa3e8 merge changes from ocaml3111rc0 to ocaml3111
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9319 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-07-20 11:51:50 +00:00
Nicolas Pouillard 9ac11d08c3 build with ocamlbuild: Fix the natdynlink build
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9281 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-05-26 12:50:41 +00:00
Damien Doligez 1f95b17570 merge changes from 3.10.2merged to 3.11.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9153 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-12-03 18:09:09 +00:00
Nicolas Pouillard 04783253f2 buildbot: switch to 3.11
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9105 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-10-27 13:45:49 +00:00
Nicolas Pouillard 34b2d44ab5 build,sys: remove a line in build/mixed-boot.sh
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9102 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-10-23 20:32:09 +00:00
Nicolas Pouillard 181b7c627d build,sys: improve the mixed build mode
- Rename this partial mode as a mixed mode.
- Use a file (build/ocamlbuild_mixed_mode) instead of an
  env var.
- Add a check when switching from mixed to non-mixed mode.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9099 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-10-23 15:29:11 +00:00
Nicolas Pouillard 7088b4e0c9 buildsys: also install CamlinternalLazy when using ocamlbuild to compile.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8979 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-08-05 13:05:23 +00:00
Damien Doligez 9ea5edac9a merge changes 3.10.0 -> 3.10.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8768 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-01-11 16:13:18 +00:00
Nicolas Pouillard 249889d1ff build,clean: distclean.sh also clean boot/ocamlyacc and boot/*.bak.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8722 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-12-18 09:03:14 +00:00
Nicolas Pouillard 8d9aef497a [build] Better support native dynlink build when using ocamlbuild to build.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8692 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-29 10:32:38 +00:00
Nicolas Pouillard d03fb7ff7a [build] Sync scripts in the build/ dir with release310.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8638 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-27 12:21:53 +00:00
Nicolas Pouillard 60858a2c2b [build sys] Install ocamlbuild executor and unix_plugin.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8601 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-22 18:45:46 +00:00
Alain Frisch 1b059475c8 Cleanup and factorization of linker-related code.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8521 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-15 13:21:15 +00:00
Alain Frisch 3958a92c72 Merge the natdynlink branch into HEAD.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8477 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-06 15:16:56 +00:00
Damien Doligez 4167841b16 fusion de la version 3.10.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8416 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-10-08 14:19:34 +00:00
Nicolas Pouillard 9286d93c33 [Camlp4] handle externals properly and fix the bootstrap system
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7929 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-02-26 16:32:47 +00:00
Nicolas Pouillard 720b56b745 Fix myocamlbuild_config.ml generation bug on Win32
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7910 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-02-23 13:52:27 +00:00
Nicolas Pouillard 3ecf34d3a9 [OCaml build system] Inverse the hygiene policy
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7896 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-02-22 16:02:44 +00:00
Jacques Garrigue b16f2d0c69 build with bourne shell
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7863 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-02-13 01:11:10 +00:00
Nicolas Pouillard ee71dd4af5 Update distclean.sh
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7861 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-02-12 15:32:52 +00:00