Skip to content

Commit

Permalink
Some more adaptations for Debian-->mingw32
Browse files Browse the repository at this point in the history
 * Remove option -mwindows which isnt working : the GUI binary refuses to
   launch in a real windows.

 * simplification of ./build. New way of use :
    ./configure -prefix "" -arch win32 && ./build win32
   This way we avoid any tricks with coq_config.ml.
   It is also best to avoid ./configure -local otherwise Envars.coqbin ()
   will be wrong later.

 * Avoid creation of an ad-hoc coq_config in myocamlbuild.ml

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12819 85f007b7-540e-0410-9357-904b9bb8a0f7
  • Loading branch information
letouzey committed Feb 26, 2010
1 parent bf4aa51 commit f5c13ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 1 addition & 4 deletions build
Expand Up @@ -15,12 +15,9 @@ ocb() { $OCAMLBUILD $FLAGS $*; }
rule() {
check_config
case $1 in
win32) cp $CFG $CFG.initial && chmod 644 $CFG && \
echo 'let arch = "win32"' >> $CFG &&
ocb coq-win32.otarget
mv -f $CFG.initial $CFG;;
clean) ocb -clean && rm -rf bin/* && rm -f $MYCFG;;
all) ocb coq.otarget;;
win32) ocb coq-win32.otarget;;
*) ocb $1;;
esac;
}
Expand Down
3 changes: 2 additions & 1 deletion myocamlbuild.ml
Expand Up @@ -249,6 +249,7 @@ let extra_rules () = begin

rule "coq_config.ml" ~prod:"coq_config.ml" ~dep:"config/coq_config.ml"
(fun _ _ ->
if w32 then cp "config/coq_config.ml" "coq_config.ml" else
let lines = read_file "config/coq_config.ml" in
let lines = List.map (fun s -> s^"\n") lines in
let srcbuild = Filename.concat coqsrc !_build in
Expand Down Expand Up @@ -374,7 +375,7 @@ let extra_rules () = begin
let depsb = "coq_config.cmo" :: core_cma in
let depideo = if is_ide then [ide_cmxa] else [] in
let depideb = if is_ide then [ide_cma] else [] in
let w32ideflag = if is_ide then [A"-ccopt";A"\"-link -mwindows\""] else [] in
let w32ideflag = (*if is_ide then [A"-ccopt";A"\"-link -mwindows\""] else*) [] in
let w32flag = if not w32 then N else S ([A"-camlbin";A w32bin]@w32ideflag) in
if opt then rule fo ~prod:fo ~deps:(depsall@depso@depideo) ~insert:`top
(cmd [P coqmktopbest;w32flag;A"-boot";A"-opt";ideflag;incl fo;A"-o";Px fo]);
Expand Down

0 comments on commit f5c13ce

Please sign in to comment.