Changeset 3997


Ignore:
Timestamp:
Sep 11, 2019 6:26:47 AM (5 weeks ago)
Author:
stefan
Message:

improve build of arith.h and rerun autotools

  • use BUILT_SOURCES
  • seems to fix issue with make ignoring vpath on windows
Location:
ThirdParty/ASL/branches/autotools-update
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ThirdParty/ASL/branches/autotools-update/Makefile.am

    r3980 r3997  
    9898        solvers/xp1known.c \
    9999        solvers/xp2known.c \
    100         details.c
     100        details.c \
     101        arith.h
    101102
    102103if CC_IS_CL
     
    111112libcoinasl_la_LDFLAGS = $(LT_LDFLAGS)
    112113
    113 # this seems to make sure that arith.h build before any of the actual ASL
    114 # sources are compiled
    115 $(libcoinasl_la_SOURCES) : arith.h
     114# make sure that arith.h is build before any of the actual ASL sources
     115BUILT_SOURCES = arith.h
    116116
    117117# program that generates arith.h
  • ThirdParty/ASL/branches/autotools-update/Makefile.in

    r3985 r3997  
    456456        solvers/writesol.c solvers/wrtsol_.c solvers/ws_desc.c \
    457457        solvers/wsu_desc.c solvers/x2check.c solvers/xectim.c \
    458         solvers/xp1known.c solvers/xp2known.c details.c \
     458        solvers/xp1known.c solvers/xp2known.c details.c arith.h \
    459459        $(am__append_1) $(am__append_2)
    460460libcoinasl_la_LIBADD = $(ASL_LFLAGS)
     
    462462# This is for libtool
    463463libcoinasl_la_LDFLAGS = $(LT_LDFLAGS)
     464
     465# make sure that arith.h is build before any of the actual ASL sources
     466BUILT_SOURCES = arith.h
    464467arithchk_SOURCES = solvers/arithchk.c $(am__append_3)
    465468@CC_IS_CL_FALSE@arithchk_CPPFLAGS = -DASL_NO_FPINITMT
     
    482485# Files that are generated and should be cleaned with make distclean
    483486DISTCLEANFILES =
    484 all: all-am
     487all: $(BUILT_SOURCES)
     488        $(MAKE) $(AM_MAKEFLAGS) all-am
    485489
    486490.SUFFIXES:
     
    10321036        -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
    10331037check-am: all-am
    1034 check: check-am
     1038check: $(BUILT_SOURCES)
     1039        $(MAKE) $(AM_MAKEFLAGS) check-am
    10351040all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(DATA) $(HEADERS)
    10361041installdirs:
     
    10381043          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
    10391044        done
    1040 install: install-am
     1045install: $(BUILT_SOURCES)
     1046        $(MAKE) $(AM_MAKEFLAGS) install-am
    10411047install-exec: install-exec-am
    10421048install-data: install-data-am
     
    10721078        @echo "This command is intended for maintainers to use"
    10731079        @echo "it deletes files that may require special tools to rebuild."
     1080        -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
    10741081clean: clean-am
    10751082
     
    13321339        uninstall-thirdpartyincludeHEADERS
    13331340
    1334 .MAKE: install-am install-strip
     1341.MAKE: all check install install-am install-strip
    13351342
    13361343.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles am--refresh check \
     
    13541361
    13551362
    1356 # this seems to make sure that arith.h build before any of the actual ASL
    1357 # sources are compiled
    1358 $(libcoinasl_la_SOURCES) : arith.h
    1359 
    13601363arith.h : arithchk$(EXEEXT)
    13611364        ./arithchk$(EXEEXT) > $@
  • ThirdParty/ASL/branches/autotools-update/compile

    r3974 r3997  
    136136  outfile=
    137137  implib=
     138  linking=1
    138139  for arg
    139140  do
     
    220221          shift
    221222          ;;
     223        -c)
     224          linking=0
     225          set x "$@" "$1"
     226          shift
     227          ;;
    222228        *)
    223229          set x "$@" "$1"
     
    233239  # remove old $implib, so we can distinguish between generated and not-generated implib below
    234240  if test -n "$implib" && test -f "$implib" ; then rm "$implib" ; fi
     241
     242  # add path to MSVC link in front on PATH if we seem to link (check isn't so accurate, but some false-positives shouldn't matter)
     243  # compiler will call the link it finds in the PATH, and we don't want it to use MSYS' /bin/link
     244  # we assume that MSVC link is in same directory as cl and that cl is found in PATH
     245  if test "$linking" = 1 && comppath=`which cl 2>/dev/null` ; then
     246    comppath=`dirname "$comppath"`
     247    #echo "Adding $comppath to front of PATH"
     248    PATH="$comppath:$PATH"
     249  fi
    235250
    236251  #echo "compile: $@ $linker_opts"
  • ThirdParty/ASL/branches/autotools-update/configure

    r3985 r3997  
    22522252  if test "$enable_debug" = yes ; then
    22532253    if test "$enable_msvc" = yes ; then
    2254       : ${FFLAGS:="-nologo -Z7 -MDd"}
    2255       : ${FCFLAGS:="-nologo -Z7 -MDd"}
     2254      : ${FFLAGS:="-nologo -fpp -Z7 -MDd"}
     2255      : ${FCFLAGS:="-nologo -fpp -Z7 -MDd"}
    22562256      : ${CFLAGS:="-nologo -Z7 -MDd"}
    2257       : ${CXXFLAGS:="-nologo -EHsc -Z7 -MDd"}
     2257      : ${CXXFLAGS:="-nologo -EHs -Z7 -MDd"}
    22582258      : ${AR:="lib"}
    22592259      : ${AR_FLAGS:="-nologo -out:"}
     
    22662266  else
    22672267    if test "$enable_msvc" = yes ; then
    2268       : ${FFLAGS:="-nologo -O2 -MD"}
    2269       : ${FCFLAGS:="-nologo -O2 -MD"}
     2268      : ${FFLAGS:="-nologo -fpp -O2 -MD"}
     2269      : ${FCFLAGS:="-nologo -fpp -O2 -MD"}
    22702270      : ${CFLAGS:="-nologo -DNDEBUG -O2 -MD"}
    2271       : ${CXXFLAGS:="-nologo -EHsc -DNDEBUG -O2 -MD"}
     2271      : ${CXXFLAGS:="-nologo -EHs -DNDEBUG -O2 -MD"}
    22722272      : ${AR:="lib"}
    22732273      : ${AR_FLAGS:="-nologo -out:"}
     
    31513151
    31523152
    3153 # Setting up libtool with LT_INIT will AC_REQUIRE AC_PROG_CC, but we want
    3154 # to invoke it from this macro first so that we can supply a parameter.
    3155 
    3156 
    3157 
    3158 # If enable-msvc, then test only for MS and Intel (on Windows) C compiler
    3159 # otherwise, test a long list of C compilers that comes into our mind
    3160 
     3153  # Setting up libtool with LT_INIT will AC_REQUIRE AC_PROG_CC, but we want
     3154  # to invoke it from this macro first so that we can supply a parameter.
     3155
     3156
     3157  # If enable-msvc, then test for Intel (on Windows) and MS C compiler
     3158  # explicitly and add compile-wrapper before AC_PROG_CC, because
     3159  # the compile-wrapper work around issues when having the wrong link.exe
     3160  # in the PATH first, which would upset tests in AC_PROG_CC.
     3161  # Further, if CC unset and not set by user, then stop with error.
    31613162  if test $enable_msvc = yes ; then
    3162     comps="icl cl"
    3163   else
    3164     # TODO old buildtools was doing some $build specific logic here, do we
    3165     # still need this?
    3166     comps="gcc clang cc icc icl cl cc xlc xlc_r pgcc"
     3163    for ac_prog in icl cl
     3164do
     3165  # Extract the first word of "$ac_prog", so it can be a program name with args.
     3166set dummy $ac_prog; ac_word=$2
     3167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     3168$as_echo_n "checking for $ac_word... " >&6; }
     3169if ${ac_cv_prog_CC+:} false; then :
     3170  $as_echo_n "(cached) " >&6
     3171else
     3172  if test -n "$CC"; then
     3173  ac_cv_prog_CC="$CC" # Let the user override the test.
     3174else
     3175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     3176for as_dir in $PATH
     3177do
     3178  IFS=$as_save_IFS
     3179  test -z "$as_dir" && as_dir=.
     3180    for ac_exec_ext in '' $ac_executable_extensions; do
     3181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     3182    ac_cv_prog_CC="$ac_prog"
     3183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     3184    break 2
    31673185  fi
     3186done
     3187  done
     3188IFS=$as_save_IFS
     3189
     3190fi
     3191fi
     3192CC=$ac_cv_prog_CC
     3193if test -n "$CC"; then
     3194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
     3195$as_echo "$CC" >&6; }
     3196else
     3197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     3198$as_echo "no" >&6; }
     3199fi
     3200
     3201
     3202  test -n "$CC" && break
     3203done
     3204
     3205    if test -n "$CC" ; then
     3206      CC="$am_aux_dir/compile $CC"
     3207    else
     3208      as_fn_error $? "Neither MS nor Intel C compiler found in PATH and CC is unset." "$LINENO" 5
     3209    fi
     3210  fi
     3211
     3212  # look for some C compiler and check whether it works
     3213  # if user has set CC or we found icl/cl above, this shouldn't overwrite CC
     3214  # other than CXX of F77, this macro also takes care of adding the compile-wrapper
    31683215  ac_ext=c
    31693216ac_cpp='$CPP $CPPFLAGS'
     
    31723219ac_compiler_gnu=$ac_cv_c_compiler_gnu
    31733220if test -n "$ac_tool_prefix"; then
    3174   for ac_prog in $comps
     3221  for ac_prog in gcc clang cc icc icl cl cc xlc xlc_r pgcc
    31753222  do
    31763223    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
     
    32163263if test -z "$CC"; then
    32173264  ac_ct_CC=$CC
    3218   for ac_prog in $comps
     3265  for ac_prog in gcc clang cc icc icl cl cc xlc xlc_r pgcc
    32193266do
    32203267  # Extract the first word of "$ac_prog", so it can be a program name with args.
Note: See TracChangeset for help on using the changeset viewer.