delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/01/19:45:20

From: Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Rebuilding Fileutils 3.16 [was: MESA3D compiling problem]
Date: Fri, 02 Jun 2000 00:28:45 +0100
Organization: Customer of Planet Online
Lines: 135
Message-ID: <hcsdjs8bd7rmv80b8np77cb8u6gq43oepa@4ax.com>
References: <t74gisokdveb04a1v97bglsnakr27gp8mo AT 4ax DOT com> <Pine DOT SUN DOT 3 DOT 91 DOT 1000522093011 DOT 22890E-100000 AT is> <med7jskucqt9jvou3h9p8m0tna97dh23li AT 4ax DOT com> <200005302131 DOT AAA14380 AT alpha DOT netvision DOT net DOT il>
NNTP-Posting-Host: modem-124.calcium.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: newsg1.svr.pol.co.uk 959902118 919 62.136.19.124 (1 Jun 2000 23:28:38 GMT)
NNTP-Posting-Date: 1 Jun 2000 23:28:38 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:

> Anyway, I cannot reproduce this on my machine: ginstall works for me
> inside and outside Bash.

Then there must be something special about your installation. ;-)

The source of all this trouble is in the way `make install' from
fileutils creates and installs the symlinks (or does not ;).  The
binary distribution has the following programs and symlinks:

	real name   dos name
	~~~~~~~~~   ~~~~~~~~
	dir     <-- d
	vdir    <-- v
	mkdir   <-- gmkdir
	rmdir   <-- grmdir
	install --> ginstall

This is also what gets built in the src directory.  All the programs
are built with their real names except for install which is actually
built as ginstall to save the makefile from exploding.  As each
program is built a symlink is created to give above structure.

`make install' copies all the programs into the bin directory and
transforms ginstall to install during the copy.  There is nothing in
the makefile to copy or create symlinks in the bin directory.

So what is left in the bin directory is the old symlinks pointing to
the new programs - except for install & ginstall, which are both
programs but new & old versions respectively.

This means after building and installing filutils with `make install'
we are left with the old version of ginstall, which *appears* to be
broken wrt /dev/env/DJDIR because everything else works fine.

The really simple fix is to just manually copy *.exe from src to bin.

Below are two diffs which correct this behaviour.  The first diff adds
support to the makefile to create an arbitary number of symlinks at
*install* time.  This leaves programs in the bin directory with their
real names, and symlinks for the dos versions:

	real name   dos name
	~~~~~~~~~   ~~~~~~~~
	dir     <-- d
	vdir    <-- v
	mkdir   <-- gmkdir
	rmdir   <-- grmdir
	install <-- ginstall

The optional second diff removes the feature to create symlinks in the
src directory at compile time, in case this causes confusion.

With filutils 4.0 looming this is not too relevant, but I hope it may
be of use to someone.  Filutils 3.16 port is 3 years old, how can this
be hidden for so long?  Please don't say I've fixed a non-problem. ;~/


*** gnu/filutil3.16/src/Makefile.in.orig Mon Jan 27 02:26:56 1997
--- gnu/filutil3.16/src/Makefile.in	Thu Jun  1 22:19:56 2000
***************
*** 53,58 ****
--- 53,66 ----
  ginstall ln dir vdir ls mkdir \
  mkfifo mknod mv rm rmdir sync touch @DF_PROG@
  
+ # Symlinks to be created at install time.
+ bin_SYMLINKS = ginstall_SYM gmkdir_SYM grmdir_SYM d_SYM v_SYM
+ ginstall_SYM = install
+ gmkdir_SYM = mkdir
+ grmdir_SYM = rmdir
+ d_SYM = dir
+ v_SYM = vdir # Do we really need this one?
+ 
  libexec_PROGRAMS = @MVDIR_PROG@
  datadir = $(prefix)/@DATADIRNAME@
  localedir = $(datadir)/locale
***************
*** 526,534 ****
  check: all
  	$(MAKE)
  installcheck:
! install-exec: install-binPROGRAMS install-libexecPROGRAMS
  	$(NORMAL_INSTALL)
  
  install-data: 
  	$(NORMAL_INSTALL)
  
--- 534,548 ----
  check: all
  	$(MAKE)
  installcheck:
! install-exec: install-binPROGRAMS install-libexecPROGRAMS \
! 		install-binSYMLINKS 
  	$(NORMAL_INSTALL)
  
+ install-binSYMLINKS: $(bin_SYMLINKS)
+ $(bin_SYMLINKS):
+ 	$(LN) -sf $(bindir)/$($@) $(bindir)/$(@:_SYM=)
+ 	stubedit $(bindir)/$(@:_SYM=).exe argv0=$($@)
+ 
  install-data: 
  	$(NORMAL_INSTALL)
  
*** gnu/filutil3.16/djgpp/configure.orig Fri Apr  4 19:56:08 1997
--- gnu/filutil3.16/djgpp/configure	Thu Jun  1 06:45:10 2000
***************
*** 6879,6903 ****
  s,winsz2,wins2,g
  s% ls.\\\$o%& ls-msdos.\$o%
  /_OBJECTS *=/s%[^\]$%& djstart.\$o%
- /^ginstall: */s/\$/ ln/
- /^	\\\$(LINK) *\\\$(ginstall_LDFLAGS)/a\\
- 	./ln -s \$@ install
- /^dir: */s/\$/ ln/
- /^	\\\$(LINK) *\\\$(dir_LDFLAGS)/a\\
- 	./ln -s \$@ d\\
- 	stubedit d.exe argv0=dir
- /^vdir: */s/\$/ ln/
- /^	\\\$(LINK) *\\\$(vdir_LDFLAGS)/a\\
- 	./ln -s \$@ v\\
- 	stubedit v.exe argv0=vdir
- /^mkdir: */s/\$/ ln/
- /^	\\\$(LINK) *\\\$(mkdir_LDFLAGS)/a\\
- 	./ln -s \$@ gmkdir\\
- 	stubedit gmkdir.exe argv0=mkdir
- /^rmdir: */s/\$/ ln/
- /^	\\\$(LINK) *\\\$(rmdir_LDFLAGS)/a\\
- 	./ln -s \$@ grmdir\\
- 	stubedit grmdir.exe argv0=rmdir
  
  CEOF
  EOF
--- 6879,6884 ----

- Raw text -


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