From 338c27598d9ca5de600b51d942de498dee5d6306 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 6 Nov 2014 03:42:22 +0100 Subject: configure: generate default_pathes and ortho_code-x86-flags. --- configure | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'configure') 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 < 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 -- cgit v1.2.3