This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Imake.tmpl not found


The XFree86 build-bindist script passes an include file and an exclude file to tar like so:

$TAR -c -v -z -f $TODIR/$BINDIR/$tarball $xfile $lfile


$xfile in this case is "-X prog-excl":


lib/Server
lib/X11
lib/modules
include/X11/bitmaps


$lfile is based on the file prog-list, but it seems to be that each entry in the list is looped through in the build-bindist script in a fashion that I don't entirely understand. The prog-list contents are below:


lib
include
lib/X11/config


The idea here is that everything in lib, include, and lib/X11/config are supposed to be included, with the exception of lib/Xserver, lib/X11, lib/modules, and include/X11/bitmaps.


For some reason, Cygwin's tar version (and this may be entirely correct, the XFree86 version might be modified) works through lib and include, properly excluding the listed directories, but it never processes lib/X11/config. I tried moving the order of the directories around, such as moving lib/X11/config to the top of prog-list, to no avail.

My reasoning behind starting with Cygwin's tar was exactly that it was "GNU tar", but I found out that that wasn't good enough of a reason :)

Harold

Christopher Faylor wrote:
On Sun, Aug 03, 2003 at 02:06:59AM -0400, Harold L Hunt II wrote:

Damien,

Huh... this is interesting.

Turns out that Cygwin's tar doesn't work the same as the tar version that is in the XFree86 souce tree in the utils module. I built their "gnu-tar" and used it to build the packages and it did include the /usr/X11R6/lib/X11/config directory in the prog package, as it is supposed to. I tried messing with the Xprog-list and Xprog-excl files to get Cygwin's tar to build the archive properly, but it just wouldn't do it. I will be uploading XFree86-prog-4.3.0-2.tar.bz2 shortly.


This is the first I've ever heard that cygwin's tar is unable to include
directories in a tar ball.  Since cygwin's tar is GNU tar, it's hard to
see why it would operate differently.

Do you have a specific failing case?
--
Please use the resources at cygwin.com rather than sending personal email.
Special for spam email harvesters: send email to aaaspam@sourceware.org
and be permanently blocked from mailing lists at sources.redhat.com
lib
include
lib/X11/config
#!/bin/sh
#
# $XFree86: xc/programs/Xserver/hw/xfree86/etc/bindist/Cygwin/build-bindist,v 1.1 2001/07/02 09:37:18 alanh Exp $
#

Usage()
{
  echo `basename $0` [-l] [-t type] [prefix] from-dir to-dir
  exit 1
}

args=
createlist=NO
type=list

while [ $# != 0 ]; do
  case $1 in
  -l)
    createlist=YES
    shift
    ;;
  -t)
    shift
    type=$1
    shift
    ;;
  *)
    args="$args $1"
    shift
    ;;
  esac
done

if [ X"$args" != X ]; then
  set - $args
fi

case $# in
3)
    PRE=$1
    shift
    ;;
2)
    PRE=X
    ;;
*)
    Usage
    ;;
esac
    
FROMDIR=$1
TODIR=$2

if [ ! -d $FROMDIR ]; then
  echo No such dir $FROMDIR
  exit 2
fi

if [ ! -d $TODIR ]; then
  echo No such dir $TODIR
  exit 2
fi

cd $TODIR
SUBDIRS="`find . -type d ! -name bindist -print`"

DIRFILE=dir
BINDIR=bindist
EXTRASFILE=extras
TAR="gnu-tar"
TAROPTS="-c -v -z"
TARLOPTS="-t -v -z -i"
CKSUM=md5
SUMFILE=SUMS.md5
LISTFILE=FILES

GenList()
{
  (cd $TODIR/$BINDIR
    rm -f $SUMFILE $LISTFILE
    for i in *.tgz; do
      echo $i
      $CKSUM $i >> $SUMFILE
      echo $i >> $LISTFILE
      echo "------------" >> $LISTFILE
      $TAR $TARLOPTS -f $i >> $LISTFILE
      echo "" >> $LISTFILE
    done
    if [ -f $TODIR/$EXTRASFILE ]; then
      for i in `cat $TODIR/$EXTRASFILE`; do
	$CKSUM `basename $i` >> $SUMFILE
      done
    fi
  )
}

if [ ! -d $TODIR/$BINDIR ]; then
  mkdir $TODIR/$BINDIR
fi

if [ $createlist = YES ]; then
  GenList
  exit 0;
fi

for d in $SUBDIRS; do
  if [ ! -d $TODIR/$d ]; then
    echo No such dir $TODIR/$d
    exit 2
  fi
  (cd $TODIR/$d;
    if [ ! -f $DIRFILE ]; then
      echo No file $DIRFILE in $TODIR/$d
#      exit 3
    else
      DEFPREFIX=`cat $DIRFILE`
      for i in *-$type; do
        name=`basename $i -$type`
        tarball=$PRE$name.tgz
        echo creating $tarball
        lfile="`cat $TODIR/$d/$i`"
        if [ -f $name-excl ]; then
          xfile="-X $TODIR/$d/$name-excl"
        else
          xfile=""
        fi
	if [ -f $name-dir ]; then
	  PREFIX=`cat $name-dir`
	else
	  PREFIX=$DEFPREFIX
	fi
        (cd $FROMDIR/$PREFIX
          $TAR $TAROPTS -f $TODIR/$BINDIR/$tarball $xfile $lfile
        )
      done
    fi
    if [ -f $EXTRASFILE ]; then
      for i in `cat $EXTRASFILE`; do
	rm -f $TODIR/$BINDIR/`basename $i`
        cp $FROMDIR/$PREFIX/$i $TODIR/$BINDIR
      done
    fi
  )
done

# GenList

exit 0
lib/Server
lib/X11
lib/modules
include/X11/bitmaps

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]