From: "Ed Manlove" Newsgroups: comp.os.msdos.djgpp References: <9XyG9.854$es4 DOT 281833501 AT news DOT netcarrier DOT net> Subject: Re: Expansion of "$srcdir" and '${DJDIR}' in gnu\binutl-2.121\build.djg\djconfig.sh Lines: 188 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-Mimeole: Produced By Microsoft MimeOLE V5.00.2615.200 Message-ID: <2KLG9.859$eJ4.282588230@news.netcarrier.net> Date: Mon, 2 Dec 2002 11:51:32 -0500 NNTP-Posting-Host: 207.207.243.37 X-Complaints-To: news AT netcarrier DOT com X-Trace: news.netcarrier.net 1038845950 207.207.243.37 (Mon, 02 Dec 2002 11:19:10 EST) NNTP-Posting-Date: Mon, 02 Dec 2002 11:19:10 EST Organization: NetCarrier Internet Services To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I have went back to the configure script for gcc-2.95.2 and modified it to atleast build to the error I am now trying to solve. I have included it below. Looking at the error I receive (shown here) ... Could not install binary fixincludes. Installing shell script instead. cp inclhack.sh ../fixinc.sh make.exe[2]: Leaving directory `c:/djgpp/gnu/gcc-2.952/build.djg/gcc/fixinc' rm -rf include; mkdir include TARGET_MACHINE=h8300-hitachi-hms; srcdir=`cd ../../gcc; pwd`; \ INSTALL_ASSERT_H=install-assert-h; SHELL=/dev/env/DJDIR/bin/sh.exe ;\ export TARGET_MACHINE srcdir INSTALL_ASSERT_H SHELL ; \ /dev/env/DJDIR/bin/sh.exe ./fixinc.sh `pwd`/include c:/djgpp/h8300-hitachi-hms/sys-include Fixing headers into c:/djgpp/gnu/gcc-2.952/build.djg/gcc/include for h8300-hitachi-hms target ./fixinc.sh: cd: c:/djgpp/h8300-hitachi-hms/sys-include: No such file or directory (ENOENT) ... I went to the ./fixinc.sh file and found the line which starts with "Fixing headers into". Here is the code in fixinc.sh at this point # # # # # # # # # # # # # # # # # # # # # # # Define PWDCMD as a command to use to get the working dir # in the form that we want. PWDCMD=pwd case "`$PWDCMD`" in //*) # On an Apollo, discard everything before `/usr'. PWDCMD="eval pwd | sed -e 's,.*/usr/,/usr/,'" ;; esac # Original directory. ORIGDIR=`${PWDCMD}` # Make LIB absolute only if needed to avoid problems with the amd. case $LIB in /*) ;; *) cd $LIB; LIB=`${PWDCMD}` ;; esac echo Fixing headers into ${LIB} for ${target_canonical} target # Determine whether this system has symbolic links. if ln -s X $LIB/ShouldNotExist 2>/dev/null; then rm -f $LIB/ShouldNotExist LINKS=true elif ln -s X /tmp/ShouldNotExist 2>/dev/null; then rm -f /tmp/ShouldNotExist LINKS=true else LINKS=false fi # # # # # # # # # # # # # # # # # # # # # # # Search each input directory for broken header files. # This loop ends near the end of the file. # if test $# -eq 0 then INPUTLIST="/usr/include" else INPUTLIST="$@" fi for INPUT in ${INPUTLIST} ; do cd ${ORIGDIR} cd ${INPUT} || continue INPUT=`${PWDCMD}` # # # # # # # # # # # # # # # # # # # # # # # echo Finding directories and links to directories # Find all directories and all symlinks that point to directories. # Put the list in $all_dirs. [SNIP] Noting that I do not receive the output "Finding directories and links to directories" I believe my error occurs with one of the cd commands just above that. I will look into the in this code but welcome any input :) Ed #! /bin/sh #begin of modified gnu\gcc-2.952\build.djg\djconfig.sh # Location of source directory export srcdir=`cd ..; pwd | sed -e 's,[a-z][:],,g'` # give now the configure script some hints topdir=`(cd $srcdir/..; pwd | sed -e 's,[a-z][:],,g';)` AS=`test -f $DJDIR/bin/as.exe && echo $DJDIR/bin/as.exe` export AS=${AS-as} export CC=gcc export CXX=gpp export LD=ld export DEFAULT_LEX=flex export LEX=flex export RANLIB=ranlib export ac_cv_path_install="ginstall -c" export CONFIG_SHELL=bash dft_target=i586-pc-msdosdjgpp # # just in case export PATH_SEPARATOR=: # # set log file LOGFILE=/dev/env/DJDIR/brickos/h8cfggcc.log $srcdir/configure --srcdir=$srcdir --disable-shared --verbose \ --with-gxx-include-dir=\\\${prefix}/lang/cxx \ --with-headers=\\\${prefix}/lib/gcc-lib/h8300-hitachi-hms/2.952/include \ --enable-languages=c,c++ \ --with-gnu-ld --target=h8300-hitachi-hms \ --host=${target-${dft_target}} \ --prefix=\\\$\$DJDIR 2>&1 | tee --append $LOGFILE # #rc=$? #dtou `find . -name Makefile` #exit ${rc} make 2>&1 | tee --append $LOGFILE #end of modified gnu\gcc-2.952\build.djg\djconfig.sh Ed Manlove wrote in message news:9XyG9.854$es4 DOT 281833501 AT news DOT netcarrier DOT net... > > > I an trying to > > > understand how the above terms are expanded by configure and the > difference > > > between the single quotes '' and the double quotes"". > > > > '${DJDIR}' in single quotes is not expanded by the shell, while in double > > quotes it _is_ expanded immediatly. > > Eli, > > Thanks for the explanation. In trying to build gcc 2.95.2 for the h8300 I > get an error (the first one, which of course brought others I stupidly > wasted time with) in the course of fixing headers. The error is shown here > > Fixing headers into c:/djgpp/gnu/gcc-2.952/build.djg/gcc/include for > h8300-hitachi-hms target > ./fixinc.sh: cd: c:/djgpp/h8300-hitachi-hms/sys-include: No such file or > directory (ENOENT) > > As I dug into why this was occurring I realized that adding > the -with-headers parameter should solve this. But I was having issue with > the proper formatting of the directory location, hence my question. I have > tried several variations which yet to have successfully built. The most > interesting results in a COPIED file generated by fixheader located in > c:\djgpp\gnu\gcc-2.952\build.djg\$DJGPP\/h8300-hitachi-hms/sys-include (or > something close to this). Cute but not right. > > If you noted the almost cross pollination of the two configure scripts for > binutls and gcc (i.e. the use of the --srcdir="$srcdir" --prefix='${DJDIR}' > in my gcc configure script) my first attempts to use the djconfig.sh script > to build gcc failed. Since I was almost immediately successful with the > binutls script I copied and slightly modified it to the point of the above > error. I will back track and retry the original script and see what I can > do to bring it to the point I am now at, fix this error, and successfully > build gcc for the h8300! > > Ed > >