Changeset ff1e0f38 for configure


Ignore:
Timestamp:
Aug 3, 2018, 1:57:12 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
ba9baad
Parents:
c59712e
Message:

configure flags are now propagated properly to libcfa

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    rc59712e rff1e0f38  
    665665CXX
    666666CFA_FLAGS
     667LIBCFA_TARGET_MAKEFILES
     668LIBCFA_TARGET_DIRS
     669TARGET_HOSTS
     670host_os
     671host_vendor
     672host_cpu
     673host
     674build_os
     675build_vendor
     676build_cpu
     677build
    667678BUILD_IN_TREE_FLAGS
    668 BUILD_IN_TREE_FLAGS_NOLIB
    669679CFACPP
    670680CFACC
     
    678688DOendif
    679689DOifskipcompile
    680 LIBCFA_TARGET_MAKEFILES
    681 LIBCFA_TARGET_DIRS
    682 TARGET_HOSTS
    683 host_os
    684 host_vendor
    685 host_cpu
    686 host
    687 build_os
    688 build_vendor
    689 build_cpu
    690 build
    691690CFA_NAME
    692691am__untar
     
    761760enable_silent_rules
    762761with_cfa_name
     762with_backend_compiler
    763763with_target_hosts
    764 with_backend_compiler
    765764enable_dependency_tracking
    766765'
     
    14211420  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
    14221421  --with-cfa-name=NAME     NAME too which cfa will be installed
     1422  --with-backend-compiler=PROGRAM     PROGRAM that performs the final code compilation (must be gcc-compatible)
    14231423  --with-target-hosts=HOSTS     HOSTS comma seperated list of hosts to build for, format ARCH:debug|nodebug|nolib
    1424   --with-backend-compiler=PROGRAM     PROGRAM that performs the final code compilation (must be gcc-compatible)
    14251424
    14261425Some influential environment variables:
     
    30863085
    30873086
    3088 #==============================================================================
    3089 # handle the list of hosts to build for
    3090 for var in $ac_configure_args
    3091 do
    3092         #strip quotes surrouding values
    3093         var=$(echo $var | sed s/\'//g)
    3094         case $var in
    3095                 # skip cross compilation related arguments
    3096                 --host=*) ;; host_alias=*) ;; --build=*) ;; build_alias=*) ;; --target=*) ;; target_alias=*) ;;
    3097 
    3098                 # append all other arguments to the sub configure arguments
    3099                 *) LIBCFA_GENERAL_ARGS="${LIBCFA_GENERAL_ARGS} $var";;
    3100         esac
    3101 done
    3102 
    3103 echo $LIBCFA_GENERAL_ARGS
    3104 
    3105 #==============================================================================
    3106 # handle the list of hosts to build for
    3107 # Make sure we can run config.sub.
    3108 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
    3109   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
    3110 
    3111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
    3112 $as_echo_n "checking build system type... " >&6; }
    3113 if ${ac_cv_build+:} false; then :
    3114   $as_echo_n "(cached) " >&6
    3115 else
    3116   ac_build_alias=$build_alias
    3117 test "x$ac_build_alias" = x &&
    3118   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
    3119 test "x$ac_build_alias" = x &&
    3120   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
    3121 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
    3122   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
    3123 
    3124 fi
    3125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
    3126 $as_echo "$ac_cv_build" >&6; }
    3127 case $ac_cv_build in
    3128 *-*-*) ;;
    3129 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
    3130 esac
    3131 build=$ac_cv_build
    3132 ac_save_IFS=$IFS; IFS='-'
    3133 set x $ac_cv_build
    3134 shift
    3135 build_cpu=$1
    3136 build_vendor=$2
    3137 shift; shift
    3138 # Remember, the first character of IFS is used to create $*,
    3139 # except with old shells:
    3140 build_os=$*
    3141 IFS=$ac_save_IFS
    3142 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
    3143 
    3144 
    3145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
    3146 $as_echo_n "checking host system type... " >&6; }
    3147 if ${ac_cv_host+:} false; then :
    3148   $as_echo_n "(cached) " >&6
    3149 else
    3150   if test "x$host_alias" = x; then
    3151   ac_cv_host=$ac_cv_build
    3152 else
    3153   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
    3154     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
    3155 fi
    3156 
    3157 fi
    3158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
    3159 $as_echo "$ac_cv_host" >&6; }
    3160 case $ac_cv_host in
    3161 *-*-*) ;;
    3162 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
    3163 esac
    3164 host=$ac_cv_host
    3165 ac_save_IFS=$IFS; IFS='-'
    3166 set x $ac_cv_host
    3167 shift
    3168 host_cpu=$1
    3169 host_vendor=$2
    3170 shift; shift
    3171 # Remember, the first character of IFS is used to create $*,
    3172 # except with old shells:
    3173 host_os=$*
    3174 IFS=$ac_save_IFS
    3175 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
    3176 
    3177 
    3178 
    3179 default_target="${host_cpu}:debug, ${host_cpu}:nodebug"
    3180 
    3181 # Check whether --with-target-hosts was given.
    3182 if test "${with_target_hosts+set}" = set; then :
    3183   withval=$with_target_hosts; target_hosts=$withval
    3184 else
    3185   target_hosts=${default_target}
    3186 fi
    3187 
    3188 
    3189 TARGET_HOSTS=${target_hosts}
    3190 
    3191 
    3192 for i in $(echo $target_hosts | sed "s/,/ /g")
    3193 do
    3194         # call your procedure/other scripts here below
    3195         lib_arch=$(echo $i | sed -r "s/:(.*)//g")
    3196         lib_config=$(echo $i | sed -r "s/(.*)://g")
    3197         lib_dir="libcfa-${lib_arch}-${lib_config}"
    3198 
    3199         LIBCFA_TARGET_DIRS="${LIBCFA_TARGET_DIRS} ${lib_dir}"
    3200         LIBCFA_TARGET_MAKEFILES="${LIBCFA_TARGET_MAKEFILES} ${lib_dir}/Makefile"
    3201 
    3202         mkdir -p libcfa-${lib_arch}-${lib_config}
    3203         echo -n "${LIBCFA_GENERAL_ARGS} " > libcfa-${lib_arch}-${lib_config}/config.data
    3204         echo -n "--host=${lib_arch} " >> libcfa-${lib_arch}-${lib_config}/config.data
    3205         echo -n "CONFIGURATION=${lib_config}" >> libcfa-${lib_arch}-${lib_config}/config.data
    3206 done
    3207 
    3208 
    3209 
    3210 
    32113087
    32123088#==============================================================================
     
    33953271#==============================================================================
    33963272# Create variables for commonly used targets
    3397 DRIVER_DIR='$(top_builddir)/driver'
    3398 CFACC=${DRIVER_DIR}/cfa
    3399 CFACPP=${DRIVER_DIR}/cfa-cpp
    3400 
    3401 
     3273
     3274TOP_SRCDIR=$ac_pwd/$ac_confdir/
     3275TOP_BUILDDIR=$ac_pwd/
     3276PRELUDE_BUILDDIR=$ac_pwd/libcfa-x86_64-debug/prelude/
    34023277
    34033278
    34043279cat >>confdefs.h <<_ACEOF
    3405 #define TOP_SRCDIR "$ac_pwd/$ac_confdir/"
     3280#define TOP_SRCDIR "$TOP_SRCDIR"
    34063281_ACEOF
    34073282
    34083283
    34093284cat >>confdefs.h <<_ACEOF
    3410 #define TOP_BUILDDIR "$ac_pwd/"
     3285#define TOP_BUILDDIR "$TOP_BUILDDIR"
    34113286_ACEOF
    34123287
    34133288
    34143289cat >>confdefs.h <<_ACEOF
    3415 #define PRELUDE_BUILDDIR "$ac_pwd/libcfa/prelude/"
    3416 _ACEOF
     3290#define PRELUDE_BUILDDIR "$PRELUDE_BUILDDIR"
     3291_ACEOF
     3292
     3293
     3294DRIVER_DIR=${TOP_BUILDDIR}driver/
     3295CFACC=${DRIVER_DIR}cfa
     3296CFACPP=${DRIVER_DIR}cfa-cpp
     3297
     3298
    34173299
    34183300
    34193301#==============================================================================
    34203302# Flag variables needed to build in tree
    3421 LIBCFA_SRC='$(top_srcdir)/libcfa/src'
    3422 LIBCFA_BUILD='$(top_builddir)/libcfa/src'
    3423 BUILD_IN_TREE_FLAGS_NOLIB="-XCFA -t -B${DRIVER_DIR}"
    3424 BUILD_IN_TREE_FLAGS="${BUILD_IN_TREE_FLAGS_NOLIB} -L${LIBCFA_BUILD} -I${LIBCFA_SRC} -I${LIBCFA_SRC}/containers -I${LIBCFA_SRC}/concurrency -I${LIBCFA_SRC}/stdhdr"
     3303LIBCFA_SRC='${TOP_SRCDIR}/libcfa/src'
     3304BUILD_IN_TREE_FLAGS="-XCFA -t -B${DRIVER_DIR}"
     3305
     3306
     3307#==============================================================================
     3308# handle the list of hosts to build for
     3309for var in $ac_configure_args
     3310do
     3311        #strip quotes surrouding values
     3312        var=$(echo $var | sed s/\'//g)
     3313        case $var in
     3314                # skip cross compilation related arguments
     3315                --host=*) ;; host_alias=*) ;; --build=*) ;; build_alias=*) ;; --target=*) ;; target_alias=*) ;;
     3316
     3317                # skip the target hosts
     3318                --with-target-hosts=*) ;;
     3319
     3320                # append all other arguments to the sub configure arguments
     3321                *) LIBCFA_GENERAL_ARGS="${LIBCFA_GENERAL_ARGS} $var";;
     3322        esac
     3323done
     3324
     3325#==============================================================================
     3326# handle the list of hosts to build for
     3327# Make sure we can run config.sub.
     3328$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
     3329  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
     3330
     3331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
     3332$as_echo_n "checking build system type... " >&6; }
     3333if ${ac_cv_build+:} false; then :
     3334  $as_echo_n "(cached) " >&6
     3335else
     3336  ac_build_alias=$build_alias
     3337test "x$ac_build_alias" = x &&
     3338  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
     3339test "x$ac_build_alias" = x &&
     3340  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
     3341ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
     3342  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
     3343
     3344fi
     3345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
     3346$as_echo "$ac_cv_build" >&6; }
     3347case $ac_cv_build in
     3348*-*-*) ;;
     3349*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
     3350esac
     3351build=$ac_cv_build
     3352ac_save_IFS=$IFS; IFS='-'
     3353set x $ac_cv_build
     3354shift
     3355build_cpu=$1
     3356build_vendor=$2
     3357shift; shift
     3358# Remember, the first character of IFS is used to create $*,
     3359# except with old shells:
     3360build_os=$*
     3361IFS=$ac_save_IFS
     3362case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
     3363
     3364
     3365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
     3366$as_echo_n "checking host system type... " >&6; }
     3367if ${ac_cv_host+:} false; then :
     3368  $as_echo_n "(cached) " >&6
     3369else
     3370  if test "x$host_alias" = x; then
     3371  ac_cv_host=$ac_cv_build
     3372else
     3373  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
     3374    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
     3375fi
     3376
     3377fi
     3378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
     3379$as_echo "$ac_cv_host" >&6; }
     3380case $ac_cv_host in
     3381*-*-*) ;;
     3382*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
     3383esac
     3384host=$ac_cv_host
     3385ac_save_IFS=$IFS; IFS='-'
     3386set x $ac_cv_host
     3387shift
     3388host_cpu=$1
     3389host_vendor=$2
     3390shift; shift
     3391# Remember, the first character of IFS is used to create $*,
     3392# except with old shells:
     3393host_os=$*
     3394IFS=$ac_save_IFS
     3395case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
     3396
     3397
     3398
     3399default_target="${host_cpu}:debug, ${host_cpu}:nodebug"
     3400
     3401# Check whether --with-target-hosts was given.
     3402if test "${with_target_hosts+set}" = set; then :
     3403  withval=$with_target_hosts; target_hosts=$withval
     3404else
     3405  target_hosts=${default_target}
     3406fi
     3407
     3408
     3409TARGET_HOSTS=${target_hosts}
     3410
     3411
     3412LIBCFA_PATHS="DRIVER_DIR=${DRIVER_DIR}"
     3413
     3414for i in $(echo $target_hosts | sed "s/,/ /g")
     3415do
     3416        # call your procedure/other scripts here below
     3417        lib_arch=$(echo $i | sed -r "s/:(.*)//g")
     3418        lib_config=$(echo $i | sed -r "s/(.*)://g")
     3419        lib_dir="libcfa-${lib_arch}-${lib_config}"
     3420
     3421        LIBCFA_TARGET_DIRS="${LIBCFA_TARGET_DIRS} ${lib_dir}"
     3422        LIBCFA_TARGET_MAKEFILES="${LIBCFA_TARGET_MAKEFILES} ${lib_dir}/Makefile"
     3423
     3424        mkdir -p libcfa-${lib_arch}-${lib_config}
     3425        echo -n "${LIBCFA_GENERAL_ARGS} " > libcfa-${lib_arch}-${lib_config}/config.data
     3426        echo -n "${LIBCFA_PATHS} " >> libcfa-${lib_arch}-${lib_config}/config.data
     3427        echo -n "--host=${lib_arch} " >> libcfa-${lib_arch}-${lib_config}/config.data
     3428        echo -n "CONFIGURATION=${lib_config}" >> libcfa-${lib_arch}-${lib_config}/config.data
     3429done
     3430
    34253431
    34263432
Note: See TracChangeset for help on using the changeset viewer.