Changeset 3800
- Timestamp:
- May 4, 2019, 9:12:42 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/build_support/yat-config.in
r3792 r3800 2 2 3 3 # Copyright (C) 2008 Jari Häkkinen, Peter Johansson 4 # Copyright (C) 2009, 2010, 2011, 2012, 2013, 2015, 2016, 2017 Peter Johansson4 # Copyright (C) 2009, 2010, 2011, 2012, 2013, 2015, 2016, 2017, 2019 Peter Johansson 5 5 # 6 6 # This file is part of the yat library, http://dev.thep.lu.se/yat … … 97 97 fi 98 98 99 flags=""99 output="" 100 100 101 101 while test $# -gt 0; do 102 102 case "$1" in 103 103 --prefix) 104 echo $prefix 105 exit 0 104 output="$output $prefix" 106 105 ;; 107 106 --bindir) 108 echo $bindir 109 exit 0 107 output="$output $bindir" 110 108 ;; 111 109 --includedir) 112 echo $includedir 113 exit 0 110 output="$output $includedir" 114 111 ;; 115 112 --libdir) 116 echo $libdir 117 exit 0 113 output="$output $libdir" 118 114 ;; 119 115 --cxx) 120 echo $CXX 121 exit 0 116 output="$output $CXX" 122 117 ;; 123 118 --cxxcpp) 124 echo $CXXCPP 125 exit 0 119 output="$output $CXXCPP" 126 120 ;; 127 121 --cppflags) … … 140 134 fi 141 135 if test x"$add_path" = x"yes"; then 142 flags="$flags-I$includedir"136 output="$output -I$includedir" 143 137 fi 144 138 else … … 147 141 # include generated files simply as "generated.h". 148 142 if test "x$abs_top_builddir" != "x$abs_top_srcdir"; then 149 flags="$flags-I$abs_top_builddir"150 flags="$flags-I$abs_top_builddir/yat/utility"143 output="$output -I$abs_top_builddir" 144 output="$output -I$abs_top_builddir/yat/utility" 151 145 fi 152 flags="$flags-I$abs_top_srcdir"146 output="$output -I$abs_top_srcdir" 153 147 fi 154 flags="$flags$YAT_CPPFLAGS $CPPFLAGS $YAT_CONFIG_CPPFLAGS"148 output="$output $YAT_CPPFLAGS $CPPFLAGS $YAT_CONFIG_CPPFLAGS" 155 149 ;; 156 150 --cxxflags) 157 flags="$flags$YAT_CXXFLAGS $CXXFLAGS $YAT_CONFIG_CXXFLAGS"151 output="$output $YAT_CXXFLAGS $CXXFLAGS $YAT_CONFIG_CXXFLAGS" 158 152 ;; 159 153 --libs) 160 flags="$flags-lyat $YAT_STATIC_LIBS $YAT_PRIMARY_LIBS $YAT_CBLAS_LIB $LIBM $LIBS"154 output="$output -lyat $YAT_STATIC_LIBS $YAT_PRIMARY_LIBS $YAT_CBLAS_LIB $LIBM $LIBS" 161 155 ;; 162 156 --libs-without-cblas) 163 flags="$flags-lyat $YAT_STATIC_LIBS $YAT_PRIMARY_LIBS $LIBM $LIBS"157 output="$output -lyat $YAT_STATIC_LIBS $YAT_PRIMARY_LIBS $LIBM $LIBS" 164 158 ;; 165 159 --ldflags) … … 170 164 : # ignore '/usr/local/lib' if we use g++ 171 165 else 172 flags="$flags-L$libdir"166 output="$output -L$libdir" 173 167 fi 174 flags="$flags$YAT_LDFLAGS $LDFLAGS $YAT_CONFIG_LDFLAGS"168 output="$output $YAT_LDFLAGS $LDFLAGS $YAT_CONFIG_LDFLAGS" 175 169 ;; 176 170 --link-libtool) 177 flags="$flags$LA_FILE $YAT_STATIC_LIBS $YAT_CBLAS_LIB"171 output="$output $LA_FILE $YAT_STATIC_LIBS $YAT_CBLAS_LIB" 178 172 ;; 179 173 --yat-la-file) 180 flags="$flags$LA_FILE"174 output="$output $LA_FILE" 181 175 ;; 182 176 --atleast-version=*) … … 243 237 done 244 238 245 echo $ flags239 echo $output 246 240 exit 0 -
trunk/test/yat_config_test.sh
r3188 r3800 48 48 grep lgsl stdout || exit_fail 49 49 50 sh $prog --cxx > expected.txt 51 sh $prog --cppflags >> expected.txt 52 sh $prog --cxxflags >> expected.txt 53 cat expected.txt 54 tr ' \t' '\n\n' < expected.txt | sort -u | grep '[a-z]' > expected2.txt 55 cat expected2.txt 56 run sh 0 $prog --cxx --cppflags --cxxflags 57 tr ' \t' '\n\n' < stdout | sort -u | grep '[a-z]' > stdout2 58 cat stdout2 59 diff -u expected2.txt stdout2 || exit_fail 60 50 61 exit_success
Note: See TracChangeset
for help on using the changeset viewer.