aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-11-06 03:42:22 +0100
committerTristan Gingold <tgingold@free.fr>2014-11-06 03:42:22 +0100
commit338c27598d9ca5de600b51d942de498dee5d6306 (patch)
tree943a52e4f6a658eff48933e523ed29c6298189ed /configure
parentc44a168397408be4e07b6efdb035f28128b21aae (diff)
downloadghdl-338c27598d9ca5de600b51d942de498dee5d6306.tar.gz
ghdl-338c27598d9ca5de600b51d942de498dee5d6306.tar.bz2
ghdl-338c27598d9ca5de600b51d942de498dee5d6306.zip
configure: generate default_pathes and ortho_code-x86-flags.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure29
1 files changed, 29 insertions, 0 deletions
diff --git a/configure b/configure
index 009ed1037..f7f9e93ce 100755
--- a/configure
+++ b/configure
@@ -47,6 +47,7 @@ for opt do
esac
done
+# Help
if test $show_help != no; then
cat <<EOF
Usage: configure [options]
@@ -124,9 +125,37 @@ echo 'sed $sed_opts < $srcdir/Makefile.in > Makefile'
chmod +x ./config.status
+# Run config.status to generate files
if ! sh ./config.status; then
echo "$progname: cannot execute config.status"
exit 1
fi
+# Generate ortho_code-x86-flags
+if test $backend = mcode; then
+ case "$build" in
+ *darwin*) ortho_flags="Flags_Macosx" ;;
+ *mingw32*) ortho_flags="Flags_Windows" ;;
+ *linux*) ortho_flags="Flags_Linux" ;;
+ *) echo "Unsupported $build build for mcode"; exit 1;;
+ esac
+ echo "Generate ortho_code-x86-flags.ads"
+ {
+ echo "with Ortho_Code.X86.$ortho_flags;"
+ echo "package Ortho_Code.X86.Flags renames Ortho_Code.X86.$ortho_flags;"
+ } > ortho_code-x86-flags.ads
+fi
+
+# Generate default_pathes.ads
+echo "Generate default_pathes.ads"
+curdir=`pwd`
+sed -e "s%@COMPILER_GCC@%ghdl1-gcc%" \
+ -e "s%@COMPILER_DEBUG@%ghdl1-debug%" \
+ -e "s%@COMPILER_MCODE@%ghdl1-mcode%" \
+ -e "s%@COMPILER_LLVM@%ghdl1-llvm%" \
+ -e "s%@POST_PROCESSOR@%oread-gcc%" \
+ -e "s%@INSTALL_PREFIX@%%" \
+ -e "s%@LIB_PREFIX@%$curdir/lib%" \
+ < $srcdir/src/ghdldrv/default_pathes.ads.in > default_pathes.ads
+
exit 0