www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/21/07:15:22

From: Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: MESA3D compiling problem
Date: Sun, 21 May 2000 11:59:24 +0100
Organization: Customer of Planet Online
Lines: 74
Message-ID: <q8gfisgn4qu65c0hjnfbo563f29igds7v4@4ax.com>
References: <dhdeis00vuu9qckbkg43n0e4tninpcc488 AT 4ax DOT com> <Pine DOT SUN DOT 3 DOT 91 DOT 1000521082829 DOT 15757G-100000 AT is>
NNTP-Posting-Host: modem-171.colorado.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: newsg3.svr.pol.co.uk 958906863 15015 62.137.57.171 (21 May 2000 11:01:03 GMT)
NNTP-Posting-Date: 21 May 2000 11:01:03 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Newsreader: Forte Agent 1.7/32.534
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:

> > There was a problem in the way one of the scripts built the directory
> > structure.  This is an incompatibilty with the DJGPP /dev/env/DJDIR
> > feature.
> 
> Please tell more details about this problem.

The makefile installs the libraries and headers to the djgpp tree.  It
knows which directories to install to (presumably from the configure
script).  It creates the directories if they do not exist.  

mkdir is no good for this because it requires top level directories to
already be in place before creating the subdirectory, and that is not
guaranteed, so a script is used to create the hierarchy.  For example
to create /foo/bar/baz, the script effectively executes: mkdir /foo;
mkdir /foo/bar; mkdir /foo/bar/baz.

The directory c:/djgpp/include/gl is required.  This is actually known
to the makefile as /dev/env/DJDIR/include/gl.  The directory does not
yet exist so the script is called.  Because /dev is not found as a
directory, the script creates it and from this point on it is doomed.

The workaround is to manually create the required directories before
the `make' so that the script is never called.

You can decide for yourself whether this should be considered a bug in
DJGPP.  I would say the problem stems from the inconsistent treatment
of /dev.  Potential fixes could be for DJGPP either to pretend that
/dev does exist or to ignore requests to `mkdir /dev'.

Pasted below is what I believe to be the culprit script:

#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman AT prep DOT ai DOT mit DOT edu>
# Created: 1993-05-16
# Public domain

# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $

errstatus=0

for file
do
   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\//
/g;s/^#/\//;p'`
   shift

   pathcomp=
   for d
   do
     pathcomp="$pathcomp$d"
     case "$pathcomp" in
       -* ) pathcomp=./$pathcomp ;;
     esac

     if test ! -d "$pathcomp"; then
        echo "mkdir $pathcomp"

        mkdir "$pathcomp" || lasterr=$?

        if test ! -d "$pathcomp"; then
  	  errstatus=$lasterr
        fi
     fi

     pathcomp="$pathcomp/"
   done
done

exit $errstatus

# mkinstalldirs ends here

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019