make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with GNUMAKE on PC platform - command line lenght limitations


From: Randy W. Sims
Subject: Re: Help with GNUMAKE on PC platform - command line lenght limitations
Date: Thu, 31 Jul 2003 22:51:33 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3a; MultiZilla v1.1.32 final) Gecko/20030624

On 7/31/2003 9:26 AM, Ron.E.Gaskins wrote:

Background:
GNUMAKE 3.80 on a Windows 2000 platform built with MSVC.


Experiment to determine size of command buffer:
Have not determined exact size yet but appears to be around 2K.  The attached 
(results1.txt) captures an experiment to erase multiple files.  While the 
command line is lengthy, it does not approach the 6K boundary indicated in 
previous e-mail.

<<results1.txt>>
Problems with $(EVAL):
Assume a legacy application, APPX, that accepts one filename as an argument.  I 
need GNUMAKE to call APPX for each file in $(FILES).  If I solve this problem I 
also have resolution to the above problem of command line too long for the 
erasing of multiple files.  It appears that the $(EVAL) is just what I need to 
do the job.  However, the syntax rules do not agree with my documentation.  Is 
the following correct?

$(foreach FILE, $(FILES), $(eval echo))

The above results in "missing separator" error. Is there a better solution? Please advise.

Here is an untested modification of some macros I use for genereating LD scripts

# $1 script, $2 filespec
define WRITE_CMD
@ $(ECHO).APPX $(2) >> $(1)

endef # keep blank line above

# $1 script, $2 files
define WRITE_SCRIPT
@ $(ECHO).echo off >> $(1)
  $(foreach file,$(2),$(call WRITE_CMD,$(1),$(file)))
endef

use it like this:

FILES = f1 f2 f3 f4 f5 f6 f7 f8 f9

some_rule:
        @  echo Generating script...
           $(call WRITE_SCRIPT,filename.bat,$(FILES))
        @- del filename.bat
        
Randy.

--
A little learning is a dang'rous thing;
Drink deep, or taste not the Pierian spring;
There shallow draughts intoxicate the brain;
And drinking largely sobers us again.
                - Alexander Pope






reply via email to

[Prev in Thread] Current Thread [Next in Thread]