Changeset df47e2f


Ignore:
Timestamp:
Mar 6, 2017, 2:06:52 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
3f80888
Parents:
e958ff8
Message:

Added partial support for renaming cfa through autoconf (using --program-transform-name)

Files:
14 edited

Legend:

Unmodified
Added
Removed
  • Makefile.in

    re958ff8 rdf47e2f  
    135135CFA_INCDIR = @CFA_INCDIR@
    136136CFA_LIBDIR = @CFA_LIBDIR@
     137CFA_NAME = @CFA_NAME@
    137138CFA_PREFIX = @CFA_PREFIX@
    138139CFLAGS = @CFLAGS@
  • configure

    re958ff8 rdf47e2f  
    668668CFA_BACKEND_CC
    669669BACKEND_CC
     670CFA_NAME
    670671MAINT
    671672MAINTAINER_MODE_FALSE
     
    30013002                        # may require auto* software to be installed
    30023003
     3004# Allow program name tansformation
     3005# will fille program_transform_name with appropriate sed regex
     3006
     3007#autoconf escapes $ and \ since automake wiill un-escape them.
     3008#Since we need to use the sed transform in autoconf we need to manualy un-escape these characters
     3009name_transform=`echo ${program_transform_name} | sed 's/\\$\\$/\\$/g' | sed 's/\\\\\\\/\\\/g'`
     3010cfa_name=`echo cfa | sed ${name_transform}`
     3011cc1_name=`echo cc1 | sed ${name_transform}`
     3012cpp_name=`echo cfa-cpp | sed ${name_transform}`
     3013
     3014#Trasforming cc1 will break compilation
     3015if ! test "${cc1_name}" = "cc1"; then
     3016    as_fn_error $? "Program transform must not modify cc1.
     3017                --program-sufix and --program-prefix not supported.
     3018                Use -program-transform-name='s/cfa$/[Desired name here]/' instead" "$LINENO" 5
     3019fi
     3020#We could support transforming cfa-cpp but since it is located in a unique subfolder we don't need to
     3021if ! test "${cpp_name}" = "cfa-cpp"; then
     3022    as_fn_error $? "Program transform must not modify cfa-cpp.
     3023                --program-sufix and --program-prefix not supported.
     3024                Use -program-transform-name='s/cfa$/[Desired name here]/' instead" "$LINENO" 5
     3025fi
     3026
     3027#Define the new name of the installed command
     3028CFA_NAME=${cfa_name}
     3029
     3030
    30033031rm -f version
    30043032echo ${PACKAGE_VERSION} > version               # file containing version number for other tools
     
    32383266
    32393267if test "$includedir" = '${prefix}/include'; then
    3240         cfa_incdir="${cfa_prefix}/include/cfa"
     3268        cfa_incdir="${cfa_prefix}/include/${cfa_name}"
    32413269else
    32423270        cfa_incdir=${includedir}
     
    32643292
    32653293if test "$libdir" = '${exec_prefix}/lib'; then
    3266         cfa_libdir="${cfa_prefix}/lib/cfa"
     3294        cfa_libdir="${cfa_prefix}/lib/${cfa_name}"
    32673295else
    32683296        cfa_libdir=${libdir}
  • configure.ac

    re958ff8 rdf47e2f  
    1717AM_INIT_AUTOMAKE
    1818AM_MAINTAINER_MODE(enable)                      # may require auto* software to be installed
     19
     20# Allow program name tansformation
     21# will fille program_transform_name with appropriate sed regex
     22AC_ARG_PROGRAM
     23#autoconf escapes $ and \ since automake wiill un-escape them.
     24#Since we need to use the sed transform in autoconf we need to manualy un-escape these characters
     25name_transform=`echo ${program_transform_name} | sed 's/\\$\\$/\\$/g' | sed 's/\\\\\\\/\\\/g'`
     26cfa_name=`echo cfa | sed ${name_transform}`
     27cc1_name=`echo cc1 | sed ${name_transform}`
     28cpp_name=`echo cfa-cpp | sed ${name_transform}`
     29
     30#Trasforming cc1 will break compilation
     31if ! test "${cc1_name}" = "cc1"; then
     32    AC_MSG_ERROR([Program transform must not modify cc1.
     33                --program-sufix and --program-prefix not supported.
     34                Use -program-transform-name='s/cfa$/[[Desired name here]]/' instead])
     35fi
     36#We could support transforming cfa-cpp but since it is located in a unique subfolder we don't need to
     37if ! test "${cpp_name}" = "cfa-cpp"; then
     38    AC_MSG_ERROR([Program transform must not modify cfa-cpp.
     39                --program-sufix and --program-prefix not supported.
     40                Use -program-transform-name='s/cfa$/[[Desired name here]]/' instead])
     41fi
     42
     43#Define the new name of the installed command
     44AC_SUBST(CFA_NAME, ${cfa_name})
    1945
    2046rm -f version
     
    129155
    130156if test "$includedir" = '${prefix}/include'; then
    131         cfa_incdir="${cfa_prefix}/include/cfa"
     157        cfa_incdir="${cfa_prefix}/include/${cfa_name}"
    132158else
    133159        cfa_incdir=${includedir}
     
    145171
    146172if test "$libdir" = '${exec_prefix}/lib'; then
    147         cfa_libdir="${cfa_prefix}/lib/cfa"
     173        cfa_libdir="${cfa_prefix}/lib/${cfa_name}"
    148174else
    149175        cfa_libdir=${libdir}
  • src/Makefile.in

    re958ff8 rdf47e2f  
    276276CFA_INCDIR = @CFA_INCDIR@
    277277CFA_LIBDIR = @CFA_LIBDIR@
     278CFA_NAME = @CFA_NAME@
    278279CFA_PREFIX = @CFA_PREFIX@
    279280CFLAGS = @CFLAGS@
  • src/benchmark/Makefile.am

    re958ff8 rdf47e2f  
    1818CFLAGS =
    1919AM_CFLAGS = -g -Wall -Wno-unused-function -O2
    20 CC = @CFA_BINDIR@/cfa
     20CC = @CFA_BINDIR@/@CFA_NAME@
    2121
    2222noinst_PROGRAMS = bench ctxswitch-coroutine ctxswitch-thread
  • src/benchmark/Makefile.in

    re958ff8 rdf47e2f  
    9494AWK = @AWK@
    9595BACKEND_CC = @BACKEND_CC@
    96 CC = @CFA_BINDIR@/cfa
     96CC = @CFA_BINDIR@/@CFA_NAME@
    9797CCAS = @CCAS@
    9898CCASDEPMODE = @CCASDEPMODE@
     
    104104CFA_INCDIR = @CFA_INCDIR@
    105105CFA_LIBDIR = @CFA_LIBDIR@
     106CFA_NAME = @CFA_NAME@
    106107CFA_PREFIX = @CFA_PREFIX@
    107108
  • src/driver/Makefile.in

    re958ff8 rdf47e2f  
    106106CFA_INCDIR = @CFA_INCDIR@
    107107CFA_LIBDIR = @CFA_LIBDIR@
     108CFA_NAME = @CFA_NAME@
    108109CFA_PREFIX = @CFA_PREFIX@
    109110CFLAGS = @CFLAGS@
  • src/examples/Makefile.am

    re958ff8 rdf47e2f  
    1818CFLAGS =
    1919AM_CFLAGS = -g -Wall -Wno-unused-function -O2
    20 CC = @CFA_BINDIR@/cfa
     20CC = @CFA_BINDIR@/@CFA_NAME@
    2121
    2222noinst_PROGRAMS = fstream_test vector_test avl_test Bench # build but do not install
  • src/examples/Makefile.in

    re958ff8 rdf47e2f  
    105105AWK = @AWK@
    106106BACKEND_CC = @BACKEND_CC@
    107 CC = @CFA_BINDIR@/cfa
     107CC = @CFA_BINDIR@/@CFA_NAME@
    108108CCAS = @CCAS@
    109109CCASDEPMODE = @CCASDEPMODE@
     
    115115CFA_INCDIR = @CFA_INCDIR@
    116116CFA_LIBDIR = @CFA_LIBDIR@
     117CFA_NAME = @CFA_NAME@
    117118CFA_PREFIX = @CFA_PREFIX@
    118119
  • src/libcfa/Makefile.am

    re958ff8 rdf47e2f  
    8181
    8282maintainer-clean-local:
    83         -rm -rf ${includedir}/*
     83        -rm -rf ${includedir}/* ${libdir}/*
  • src/libcfa/Makefile.in

    re958ff8 rdf47e2f  
    201201CFA_INCDIR = @CFA_INCDIR@
    202202CFA_LIBDIR = @CFA_LIBDIR@
     203CFA_NAME = @CFA_NAME@
    203204CFA_PREFIX = @CFA_PREFIX@
    204205CFLAGS = -quiet -no-include-stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS}
     
    315316libcfa_d_a_CFLAGS = -debug -O0
    316317stdhdr = ${shell echo stdhdr/*}
    317 cfa_includedir = ${CFA_INCDIR}
     318cfa_includedir = $(CFA_INCDIR)
    318319nobase_cfa_include_HEADERS = ${headers} ${stdhdr} concurrency/invoke.h
    319320CLEANFILES = libcfa-prelude.c
     
    11601161
    11611162maintainer-clean-local:
    1162         -rm -rf ${includedir}/*
     1163        -rm -rf ${includedir}/* ${libdir}/*
    11631164
    11641165# Tell versions [3.59,3.63) of GNU make to not export all variables.
  • src/prelude/Makefile.in

    re958ff8 rdf47e2f  
    105105CFA_INCDIR = @CFA_INCDIR@
    106106CFA_LIBDIR = @CFA_LIBDIR@
     107CFA_NAME = @CFA_NAME@
    107108CFA_PREFIX = @CFA_PREFIX@
    108109CFLAGS = @CFLAGS@
  • src/tests/Makefile.am

    re958ff8 rdf47e2f  
    3030EXTRA_FLAGS =
    3131CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ ${EXTRA_FLAGS}
    32 CC = @CFA_BINDIR@/cfa
     32CC = @CFA_BINDIR@/@CFA_NAME@
    3333
    3434.PHONY : list
  • src/tests/Makefile.in

    re958ff8 rdf47e2f  
    113113AWK = @AWK@
    114114BACKEND_CC = @BACKEND_CC@
    115 CC = @CFA_BINDIR@/cfa
     115CC = @CFA_BINDIR@/@CFA_NAME@
    116116CCAS = @CCAS@
    117117CCASDEPMODE = @CCASDEPMODE@
     
    123123CFA_INCDIR = @CFA_INCDIR@
    124124CFA_LIBDIR = @CFA_LIBDIR@
     125CFA_NAME = @CFA_NAME@
    125126CFA_PREFIX = @CFA_PREFIX@
    126127CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ ${EXTRA_FLAGS}
Note: See TracChangeset for help on using the changeset viewer.