www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/12/12/09:42:55

Date: Tue, 12 Dec 1995 08:21:38 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Michael E. Wesolowski" <mewesolo AT freenet DOT calgary DOT ab DOT ca>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: building gcc 2.7.1 on DOS

On Sun, 10 Dec 1995, Michael E. Wesolowski wrote:

> details available if required). The next stage is to 'make stage1' which 
> copies a bunch of files to the 'stage1' directory. Unfortunately, the 
> commands in teh makefile are unix based, which is where I'm having trouble.
> 
> I think that what I have to do for DOS is execute the command
> 
> for %filename in ($(files_to_move)) do move %filename stage1
> 
> where %filename might also be %%filename (according to DOS help, 
> %filename is used from the command line, and %%filename from batch 
> files). I've successfully executed 
> variations of this command from the DOS command line, but inserting them 
> in a makefile does not work (not the gcc makefile, but one I created to 
> test it).
> 
> The first question is, am I on the right track? Am I performing steps 
> that actually need to be performed? If so, am I executing the correct 
> command to do what needs to be done? If so, what do I need to do to make 
> it work? I'm trying to avoid having to manually copy these files.

You are on the right track, assuming you *must* do this with DOS tools.  
(After all, Unix-like fileutils can be gotten quite easily from SimTel 
mirrors.)  You should invoke the commands like above through a sub-shell, 
like this:

command /c for %%filename in ($(files_to_move)) do move %%filename stage1

(note the double-percent chars).

Also note that not all versions of DOS have MOVE command, but if you are 
only doing this for yourself, you don't need to be concerned about it.

For the compare step (which you will meet further down the line) you will
need cmp from GNU diffutils.  If you want to do that step (it's optional)
be warned that some early DOS ports of it think all files on a DOS disk
are identical, so you might get incorrect reports. 

- Raw text -


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