@@ -27,6 +27,8 @@ clightgen=false
2727install_coqdev=false
2828responsefile=" gnu"
2929ignore_coq_version=false
30+ library_Flocq=local
31+ library_MenhirLib=local
3032
3133usage=' Usage: ./configure [options] target
3234For help on options and targets, do: ./configure -help
@@ -84,6 +86,8 @@ Options:
8486 -libdir <dir> Install libraries in <dir>
8587 -coqdevdir <dir> Install Coq development (.vo files) in <dir>
8688 -toolprefix <pref> Prefix names of tools ("gcc", etc) with <pref>
89+ -use-external-Flocq Use an already-installed Flocq library
90+ -use-external-MenhirLib Use an already-installed MenhirLib library
8791 -no-runtime-lib Do not compile nor install the runtime support library
8892 -no-standard-headers Do not install nor use the standard .h headers
8993 -clightgen Also compile and install the clightgen tool
@@ -124,6 +128,10 @@ while : ; do
124128 ignore_coq_version=true;;
125129 -install-coqdev|--install-coqdev|-install-coq-dev|--install-coq-dev)
126130 install_coqdev=true;;
131+ -use-external-Flocq|--use-external-Flocq)
132+ library_Flocq=external;;
133+ -use-external-MenhirLib|--use-external-MenhirLib)
134+ library_MenhirLib=external;;
127135 -help|--help)
128136 echo " $help " ; exit 0;;
129137 -* )
@@ -611,47 +619,6 @@ if $missingtools; then
611619 exit 2
612620fi
613621
614- cat > .merlin << EOF
615- S lib
616- S common
617- S $arch
618- S backend
619- S cfrontend
620- S driver
621- S debug
622- S exportclight
623- S cparser
624- S extraction
625-
626- B lib
627- B common
628- B $arch
629- B backend
630- B cfrontend
631- B driver
632- B debug
633- B exportclight
634- B cparser
635- B extraction
636-
637- EOF
638-
639- echo " -R lib compcert.lib \
640- -R common compcert.common \
641- -R ${arch} compcert.${arch} \
642- -R backend compcert.backend \
643- -R cfrontend compcert.cfrontend \
644- -R driver compcert.driver \
645- -R flocq compcert.flocq \
646- -R exportclight compcert.exportclight \
647- -R cparser compcert.cparser \
648- -R MenhirLib compcert.MenhirLib" > _CoqProject
649- case $arch in
650- x86)
651- echo " -R x86_${bitsize} compcert.x86_${bitsize} " >> _CoqProject
652- ;;
653- esac
654-
655622#
656623# Generate Makefile.config
657624#
@@ -694,6 +661,8 @@ LIBMATH=$libmath
694661MODEL=$model
695662SYSTEM=$system
696663RESPONSEFILE=$responsefile
664+ LIBRARY_FLOCQ=$library_Flocq
665+ LIBRARY_MENHIRLIB=$library_MenhirLib
697666EOF
698667else
699668cat >> Makefile.config << 'EOF '
@@ -787,9 +756,41 @@ CLIGHTGEN=false
787756# Whether the other tools support responsefiles in gnu syntax
788757RESPONSEFILE="none"
789758
759+ # Whether to use the local copies of Flocq and MenhirLib
760+ LIBRARY_FLOCQ=local # external
761+ LIBRARY_MENHIRLIB=local # external
790762EOF
791763fi
792764
765+ #
766+ # Generate Merlin and CoqProject files to simplify development
767+ #
768+ cat > .merlin << EOF
769+ S lib
770+ S common
771+ S $arch
772+ S backend
773+ S cfrontend
774+ S driver
775+ S debug
776+ S exportclight
777+ S cparser
778+ S extraction
779+
780+ B lib
781+ B common
782+ B $arch
783+ B backend
784+ B cfrontend
785+ B driver
786+ B debug
787+ B exportclight
788+ B cparser
789+ B extraction
790+ EOF
791+
792+ make CoqProject
793+
793794#
794795# Clean up target-dependent files to force their recompilation
795796#
@@ -828,6 +829,8 @@ CompCert configuration:
828829 Math library.................. $libmath
829830 Build command to use.......... $make
830831 Menhir API library............ $menhir_dir
832+ The Flocq library............. $library_Flocq
833+ The MenhirLib library......... $library_MenhirLib
831834 Binaries installed in......... $bindirexp
832835 Runtime library provided...... $has_runtime_lib
833836 Library files installed in.... $libdirexp
846849fi
847850
848851fi
849-
0 commit comments