llvm.org GIT mirror llvm / aea7fe4
For PR848: 1. Get the path to the pwd binary (/bin/pwd usually) from configure. 2. Use that path to run pwd in all path variables set in Makefile.config.in The hope is that these changes will resolve symlinks to physical paths. This should work on all platforms where the binary pwd defaults to printing physical paths. The shell version of pwd generally doesn't (it will print the symlink path). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29381 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 13 years ago
3 changed file(s) with 80 addition(s) and 37 deletion(s). Raw diff Collapse all Expand all
3232 #
3333 ###########################################################################
3434
35 PWD := @BINPWD@
3536 # Set the project name to LLVM if its not defined
3637 ifndef PROJECT_NAME
3738 PROJECT_NAME := LLVM
3839 endif
3940
40 PROJ_OBJ_DIR := $(shell pwd)
41 PROJ_OBJ_ROOT := $(subst //,/,$(shell cd $(PROJ_OBJ_DIR)/$(LEVEL); pwd))
41 PROJ_OBJ_DIR := $(shell $(PWD))
42 PROJ_OBJ_ROOT := $(shell cd $(PROJ_OBJ_DIR)/$(LEVEL); $(PWD))
4243
4344 ifeq ($(PROJECT_NAME),LLVM)
44 LLVM_SRC_ROOT := @abs_top_srcdir@
45 LLVM_OBJ_ROOT := @abs_top_builddir@
46 PROJ_SRC_ROOT := $(LLVM_SRC_ROOT)
47 PROJ_SRC_DIR := $(subst //,/,$(LLVM_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)))
45 LLVM_SRC_ROOT := $(shell cd @abs_top_srcdir@; $(PWD))
46 LLVM_OBJ_ROOT := $(shell cd @abs_top_builddir@; $(PWD))
47 PROJ_SRC_ROOT := $(shell cd $(LLVM_SRC_ROOT); $(PWD))
48 PROJ_SRC_DIR := $(shell cd $(LLVM_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)); $(PWD))
4849 PROJ_prefix := @prefix@
4950 PROJ_bindir := @prefix@/bin
5051 PROJ_libdir := @prefix@/lib
7172 ifndef LLVM_OBJ_ROOT
7273 $(error Projects must define LLVM_OBJ_ROOT)
7374 endif
74 PROJ_SRC_DIR := $(subst //,/,$(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)))
75 PROJ_SRC_DIR := $(shell cd $(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)); $(PWD))
7576 PROJ_prefix := $(PROJ_INSTALL_ROOT)
7677 PROJ_bindir := $(PROJ_INSTALL_ROOT)/bin
7778 PROJ_libdir := $(PROJ_INSTALL_ROOT)/lib
373373 AC_PATH_PROG(RM, [rm], [rm])
374374 AC_PATH_PROG(SED, [sed], [sed])
375375 AC_PATH_PROG(TAR, [tar], [gtar])
376 AC_PATH_PROG(BINPWD,[pwd], [pwd])
376377
377378 dnl Looking for misc. graph plotting software
378379 AC_PATH_PROG(GRAPHVIZ, [Graphviz], [echo Graphviz])
476476 # include
477477 #endif"
478478
479 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS LLVM_COPYRIGHT subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS LLVM_ON_UNIX LLVM_ON_WIN32 ARCH ENDIAN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LLVM_CROSS_COMPILING BUILD_CC BUILD_EXEEXT CVSBUILD ENABLE_OPTIMIZED DISABLE_ASSERTIONS DEBUG_RUNTIME JIT TARGET_HAS_JIT ENABLE_DOXYGEN ENABLE_THREADS TARGETS_TO_BUILD EXTRA_OPTIONS CPP CXX CXXFLAGS ac_ct_CXX LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON NM ifGNUmake LN_S CMP CP DATE FIND GREP MKDIR MV RANLIB ac_ct_RANLIB RM SED TAR GRAPHVIZ DOT GV DOTTY PERL HAVE_PERL INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA BZIP2 DOXYGEN ETAGS GROFF GZIP POD2HTML POD2MAN RUNTEST TCLSH ZIP EGREP INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL ECHO AR ac_ct_AR STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ETAGSFLAGS LLVMGCC LLVMGXX ALLOCA MMAP_FILE LLVMCC1 LLVMCC1PLUS LLVMGCCDIR LLVMGCC_VERSION LLVMGCC_MAJVERS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS'
479 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS LLVM_COPYRIGHT subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS LLVM_ON_UNIX LLVM_ON_WIN32 ARCH ENDIAN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LLVM_CROSS_COMPILING BUILD_CC BUILD_EXEEXT CVSBUILD ENABLE_OPTIMIZED DISABLE_ASSERTIONS DEBUG_RUNTIME JIT TARGET_HAS_JIT ENABLE_DOXYGEN ENABLE_THREADS TARGETS_TO_BUILD EXTRA_OPTIONS CPP CXX CXXFLAGS ac_ct_CXX LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON NM ifGNUmake LN_S CMP CP DATE FIND GREP MKDIR MV RANLIB ac_ct_RANLIB RM SED TAR BINPWD GRAPHVIZ DOT GV DOTTY PERL HAVE_PERL INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA BZIP2 DOXYGEN ETAGS GROFF GZIP POD2HTML POD2MAN RUNTEST TCLSH ZIP EGREP INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL ECHO AR ac_ct_AR STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ETAGSFLAGS LLVMGCC LLVMGXX ALLOCA MMAP_FILE LLVMCC1 LLVMCC1PLUS LLVMGCCDIR LLVMGCC_VERSION LLVMGCC_MAJVERS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS'
480480 ac_subst_files=''
481481
482482 # Initialize some variables set by options.
53725372 echo "${ECHO_T}no" >&6
53735373 fi
53745374
5375 # Extract the first word of "pwd", so it can be a program name with args.
5376 set dummy pwd; ac_word=$2
5377 echo "$as_me:$LINENO: checking for $ac_word" >&5
5378 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5379 if test "${ac_cv_path_BINPWD+set}" = set; then
5380 echo $ECHO_N "(cached) $ECHO_C" >&6
5381 else
5382 case $BINPWD in
5383 [\\/]* | ?:[\\/]*)
5384 ac_cv_path_BINPWD="$BINPWD" # Let the user override the test with a path.
5385 ;;
5386 *)
5387 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5388 for as_dir in $PATH
5389 do
5390 IFS=$as_save_IFS
5391 test -z "$as_dir" && as_dir=.
5392 for ac_exec_ext in '' $ac_executable_extensions; do
5393 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5394 ac_cv_path_BINPWD="$as_dir/$ac_word$ac_exec_ext"
5395 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5396 break 2
5397 fi
5398 done
5399 done
5400
5401 test -z "$ac_cv_path_BINPWD" && ac_cv_path_BINPWD="pwd"
5402 ;;
5403 esac
5404 fi
5405 BINPWD=$ac_cv_path_BINPWD
5406
5407 if test -n "$BINPWD"; then
5408 echo "$as_me:$LINENO: result: $BINPWD" >&5
5409 echo "${ECHO_T}$BINPWD" >&6
5410 else
5411 echo "$as_me:$LINENO: result: no" >&5
5412 echo "${ECHO_T}no" >&6
5413 fi
5414
53755415
53765416 # Extract the first word of "Graphviz", so it can be a program name with args.
53775417 set dummy Graphviz; ac_word=$2
87508790 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
87518791 lt_status=$lt_dlunknown
87528792 cat > conftest.$ac_ext <
8753 #line 8754 "configure"
8793 #line 8794 "configure"
87548794 #include "confdefs.h"
87558795
87568796 #if HAVE_DLFCN_H
1074110781 ;;
1074210782 *-*-irix6*)
1074310783 # Find out which ABI we are using.
10744 echo '#line 10745 "configure"' > conftest.$ac_ext
10784 echo '#line 10785 "configure"' > conftest.$ac_ext
1074510785 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1074610786 (eval $ac_compile) 2>&5
1074710787 ac_status=$?
1122611266
1122711267
1122811268 # Provide some information about the compiler.
11229 echo "$as_me:11230:" \
11269 echo "$as_me:11270:" \
1123011270 "checking for Fortran 77 compiler version" >&5
1123111271 ac_compiler=`set X $ac_compile; echo $2`
1123211272 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5
1228312323 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1228412324 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1228512325 -e 's:$: $lt_compiler_flag:'`
12286 (eval echo "\"\$as_me:12287: $lt_compile\"" >&5)
12326 (eval echo "\"\$as_me:12327: $lt_compile\"" >&5)
1228712327 (eval "$lt_compile" 2>conftest.err)
1228812328 ac_status=$?
1228912329 cat conftest.err >&5
12290 echo "$as_me:12291: \$? = $ac_status" >&5
12330 echo "$as_me:12331: \$? = $ac_status" >&5
1229112331 if (exit $ac_status) && test -s "$ac_outfile"; then
1229212332 # The compiler can only warn and ignore the option if not recognized
1229312333 # So say no if there are warnings
1252612566 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1252712567 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1252812568 -e 's:$: $lt_compiler_flag:'`
12529 (eval echo "\"\$as_me:12530: $lt_compile\"" >&5)
12569 (eval echo "\"\$as_me:12570: $lt_compile\"" >&5)
1253012570 (eval "$lt_compile" 2>conftest.err)
1253112571 ac_status=$?
1253212572 cat conftest.err >&5
12533 echo "$as_me:12534: \$? = $ac_status" >&5
12573 echo "$as_me:12574: \$? = $ac_status" >&5
1253412574 if (exit $ac_status) && test -s "$ac_outfile"; then
1253512575 # The compiler can only warn and ignore the option if not recognized
1253612576 # So say no if there are warnings
1258612626 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1258712627 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1258812628 -e 's:$: $lt_compiler_flag:'`
12589 (eval echo "\"\$as_me:12590: $lt_compile\"" >&5)
12629 (eval echo "\"\$as_me:12630: $lt_compile\"" >&5)
1259012630 (eval "$lt_compile" 2>out/conftest.err)
1259112631 ac_status=$?
1259212632 cat out/conftest.err >&5
12593 echo "$as_me:12594: \$? = $ac_status" >&5
12633 echo "$as_me:12634: \$? = $ac_status" >&5
1259412634 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1259512635 then
1259612636 # The compiler can only warn and ignore the option if not recognized
1477114811 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1477214812 lt_status=$lt_dlunknown
1477314813 cat > conftest.$ac_ext <
14774 #line 14775 "configure"
14814 #line 14815 "configure"
1477514815 #include "confdefs.h"
1477614816
1477714817 #if HAVE_DLFCN_H
1486914909 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1487014910 lt_status=$lt_dlunknown
1487114911 cat > conftest.$ac_ext <
14872 #line 14873 "configure"
14912 #line 14913 "configure"
1487314913 #include "confdefs.h"
1487414914
1487514915 #if HAVE_DLFCN_H
1706217102 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1706317103 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1706417104 -e 's:$: $lt_compiler_flag:'`
17065 (eval echo "\"\$as_me:17066: $lt_compile\"" >&5)
17105 (eval echo "\"\$as_me:17106: $lt_compile\"" >&5)
1706617106 (eval "$lt_compile" 2>conftest.err)
1706717107 ac_status=$?
1706817108 cat conftest.err >&5
17069 echo "$as_me:17070: \$? = $ac_status" >&5
17109 echo "$as_me:17110: \$? = $ac_status" >&5
1707017110 if (exit $ac_status) && test -s "$ac_outfile"; then
1707117111 # The compiler can only warn and ignore the option if not recognized
1707217112 # So say no if there are warnings
1712217162 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1712317163 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1712417164 -e 's:$: $lt_compiler_flag:'`
17125 (eval echo "\"\$as_me:17126: $lt_compile\"" >&5)
17165 (eval echo "\"\$as_me:17166: $lt_compile\"" >&5)
1712617166 (eval "$lt_compile" 2>out/conftest.err)
1712717167 ac_status=$?
1712817168 cat out/conftest.err >&5
17129 echo "$as_me:17130: \$? = $ac_status" >&5
17169 echo "$as_me:17170: \$? = $ac_status" >&5
1713017170 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1713117171 then
1713217172 # The compiler can only warn and ignore the option if not recognized
1848318523 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1848418524 lt_status=$lt_dlunknown
1848518525 cat > conftest.$ac_ext <
18486 #line 18487 "configure"
18526 #line 18527 "configure"
1848718527 #include "confdefs.h"
1848818528
1848918529 #if HAVE_DLFCN_H
1858118621 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1858218622 lt_status=$lt_dlunknown
1858318623 cat > conftest.$ac_ext <
18584 #line 18585 "configure"
18624 #line 18625 "configure"
1858518625 #include "confdefs.h"
1858618626
1858718627 #if HAVE_DLFCN_H
1941819458 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1941919459 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1942019460 -e 's:$: $lt_compiler_flag:'`
19421 (eval echo "\"\$as_me:19422: $lt_compile\"" >&5)
19461 (eval echo "\"\$as_me:19462: $lt_compile\"" >&5)
1942219462 (eval "$lt_compile" 2>conftest.err)
1942319463 ac_status=$?
1942419464 cat conftest.err >&5
19425 echo "$as_me:19426: \$? = $ac_status" >&5
19465 echo "$as_me:19466: \$? = $ac_status" >&5
1942619466 if (exit $ac_status) && test -s "$ac_outfile"; then
1942719467 # The compiler can only warn and ignore the option if not recognized
1942819468 # So say no if there are warnings
1947819518 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1947919519 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1948019520 -e 's:$: $lt_compiler_flag:'`
19481 (eval echo "\"\$as_me:19482: $lt_compile\"" >&5)
19521 (eval echo "\"\$as_me:19522: $lt_compile\"" >&5)
1948219522 (eval "$lt_compile" 2>out/conftest.err)
1948319523 ac_status=$?
1948419524 cat out/conftest.err >&5
19485 echo "$as_me:19486: \$? = $ac_status" >&5
19525 echo "$as_me:19526: \$? = $ac_status" >&5
1948619526 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1948719527 then
1948819528 # The compiler can only warn and ignore the option if not recognized
2151721557 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
2151821558 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2151921559 -e 's:$: $lt_compiler_flag:'`
21520 (eval echo "\"\$as_me:21521: $lt_compile\"" >&5)
21560 (eval echo "\"\$as_me:21561: $lt_compile\"" >&5)
2152121561 (eval "$lt_compile" 2>conftest.err)
2152221562 ac_status=$?
2152321563 cat conftest.err >&5
21524 echo "$as_me:21525: \$? = $ac_status" >&5
21564 echo "$as_me:21565: \$? = $ac_status" >&5
2152521565 if (exit $ac_status) && test -s "$ac_outfile"; then
2152621566 # The compiler can only warn and ignore the option if not recognized
2152721567 # So say no if there are warnings
2176021800 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
2176121801 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2176221802 -e 's:$: $lt_compiler_flag:'`
21763 (eval echo "\"\$as_me:21764: $lt_compile\"" >&5)
21803 (eval echo "\"\$as_me:21804: $lt_compile\"" >&5)
2176421804 (eval "$lt_compile" 2>conftest.err)
2176521805 ac_status=$?
2176621806 cat conftest.err >&5
21767 echo "$as_me:21768: \$? = $ac_status" >&5
21807 echo "$as_me:21808: \$? = $ac_status" >&5
2176821808 if (exit $ac_status) && test -s "$ac_outfile"; then
2176921809 # The compiler can only warn and ignore the option if not recognized
2177021810 # So say no if there are warnings
2182021860 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
2182121861 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2182221862 -e 's:$: $lt_compiler_flag:'`
21823 (eval echo "\"\$as_me:21824: $lt_compile\"" >&5)
21863 (eval echo "\"\$as_me:21864: $lt_compile\"" >&5)
2182421864 (eval "$lt_compile" 2>out/conftest.err)
2182521865 ac_status=$?
2182621866 cat out/conftest.err >&5
21827 echo "$as_me:21828: \$? = $ac_status" >&5
21867 echo "$as_me:21868: \$? = $ac_status" >&5
2182821868 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2182921869 then
2183021870 # The compiler can only warn and ignore the option if not recognized
2400524045 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2400624046 lt_status=$lt_dlunknown
2400724047 cat > conftest.$ac_ext <
24008 #line 24009 "configure"
24048 #line 24049 "configure"
2400924049 #include "confdefs.h"
2401024050
2401124051 #if HAVE_DLFCN_H
2410324143 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2410424144 lt_status=$lt_dlunknown
2410524145 cat > conftest.$ac_ext <
24106 #line 24107 "configure"
24146 #line 24147 "configure"
2410724147 #include "confdefs.h"
2410824148
2410924149 #if HAVE_DLFCN_H
3211532155 s,@RM@,$RM,;t t
3211632156 s,@SED@,$SED,;t t
3211732157 s,@TAR@,$TAR,;t t
32158 s,@BINPWD@,$BINPWD,;t t
3211832159 s,@GRAPHVIZ@,$GRAPHVIZ,;t t
3211932160 s,@DOT@,$DOT,;t t
3212032161 s,@GV@,$GV,;t t