bug-make
[Top][All Lists]
Advanced

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

RE: GNU enhancement -- $(xargs cmd, list)


From: Howard Chu
Subject: RE: GNU enhancement -- $(xargs cmd, list)
Date: Mon, 6 Nov 2000 15:23:19 -0800

> I will look at it.  It would be nice if it were generalized to Windows
> platforms, where people occasionally ask for what passes for here-doc
> support for the Windows command.com.

This won't be clean, everyone is asking for something vaguely similar
but implemented in a completely different manner.
====
>From Tal Benavidor address@hidden on Sun 10/29/00 5:33 AM:
windows temp file support:

out.abs: $(objs)
  $(LINK) $@ @<<
  $(objs)
<<
====
With a Windows make program, the above snippet would write the contents of
$(objs),
one word per line, into a temp file and then invoke $(LINK) as
   link out.abs @tempfilename

Note that it is the invoked executable that interprets the '@' character in
these
commands, not the DOS shell. This functionality is a holdover from the days
before
the DOS shell had real I/O redirection. (Although it's arguable whether it
really
does even now....) Unfortunately, even now that you *can* do redirection, I
don't
think most development tools will support it for this purpose.

While it should be simple enough to provide the functionality of dumping
variables
into temp files and providing their names, I don't see a single way to do it
that
will allow direct use of a Windows makefile, without tweaking/editing.
Basically,
this DOS version of Here Documents looks almost like the Unix version but is
different
enough to be hopelessly confusing.

I suppose for gmake you could rewrite the above as
out.abs: $(objs)
   echo $(objs) > lnk.$$$$; $(LINK) $@ @lnk.$$$$ ; $(RM) lnk.$$$$

====
>From Tom Drabenstott address@hidden on Tue 10/31/00 12:55 PM
The snippet:

my_cfg_file :<
        temp command line one
        temp command line two
        etc.

stage2:  my_cfg_file stage1
        my_exec -command my_cfg_file

(Copy temp command lines into my_cfg_file to make it, then use it in
stage2...) This
still looks like a job best left to echo. I suppose you could also use the
commandline
"printf" command as well, if you have it and are facing a quoting nightmare.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc




reply via email to

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