summaryrefslogtreecommitdiff
path: root/mcon/U/usrinc.U
diff options
context:
space:
mode:
authorrmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d>2010-11-28 18:22:20 +0000
committerrmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d>2010-11-28 18:22:20 +0000
commit59850e4d0446e5430d8b460af8fcdedabcaa1d7a (patch)
tree831d92482d8ff106e35ce8fa02ddd344f4954cd8 /mcon/U/usrinc.U
parent54f74c0343541c289ff3e40f3e61e1a937882682 (diff)
Restored old code, commenting out the attempt to gather the include path
by parsing cpp output. git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@43 2592e710-e01b-42a5-8df0-11608a6cc53d
Diffstat (limited to 'mcon/U/usrinc.U')
-rw-r--r--mcon/U/usrinc.U26
1 files changed, 14 insertions, 12 deletions
diff --git a/mcon/U/usrinc.U b/mcon/U/usrinc.U
index a3c21a9..e3ac4e6 100644
--- a/mcon/U/usrinc.U
+++ b/mcon/U/usrinc.U
@@ -21,28 +21,30 @@
?RCS: Revision 3.0 1993/08/18 12:09:58 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:usrinc: cat Getfile Guess Oldconfig cppstdin cppminus \
- fieldn grep sed awk tr
+?MAKE:usrinc: Getfile Oldconfig incpath
?MAKE: -pick add $@ %<
?S:usrinc:
?S: This variable holds the path of the include files, which is
?S: usually /usr/include. It is mainly used by other Configure units.
?S:.
?D:usrinc='/usr/include'
-?F:!usr.c
: What should the include directory be ?
echo " "
dflt='/usr/include'
case "$usrinc" in
-'')
- $cat >usr.c <<EOC
- #include <stdio.h>
-EOC
- dflt=`$cppstdin $cppminus < usr.c 2>/dev/null | \
- $grep "^[ ]*#.*stdio.h" | $tr -d '"' | \
- $sed -ne "1s,\(.*\)[/\\]stdio.h.*,\1,p" | \
- $awk "{ print \\$$fieldn }"`
- ;;
+'') dflt="$incpath/usr/include";;
+?X: This is nice, but it does not work on some systems because gcc redirects
+?X: the include to things like ..../gcc45/gcc/4.5.2/include-fixed/stdio.h
+?X: and it does not contain all the files.
+?X:
+?X: $cat >usr.c <<EOC
+?X: #include <stdio.h>
+?X:EOC
+?X: dflt=`$cppstdin $cppminus < usr.c 2>/dev/null | \
+?X: $grep "^[ ]*#.*stdio.h" | $tr -d '"' | \
+?X: $sed -ne "1s,\(.*\)[/\\]stdio.h.*,\1,p" | \
+?X: $awk "{ print \\$$fieldn }"`
+?X: ;;
*) dflt="$usrinc";;
esac
fn=d/