www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/06/10:11:50

Date: Mon, 6 Jan 1997 16:53:58 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Alaric Dailey <alaric AT oasis DOT novia DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: GUILE port?
In-Reply-To: <5aqh26$50s@nntp.novia.net>
Message-ID: <Pine.SUN.3.91.970106164519.25502A-100000@is>
MIME-Version: 1.0

On 6 Jan 1997, Alaric Dailey wrote:

> : all_subdirs=`cat $srcdir/*/PLUGIN/REQ $srcdir/*/PLUGIN/OPT /dev/null |
> : tsort | xargs echo`
> 
> it looks like this is building a list of all the subdirectories under
> $srcdir (whereever this is defined in the makefile) catting the files
> (which will do the same thing as DOS "type"  sorting the output making
> sure there are no duplicate listings and then xargs will put the whole
> damn shmear on a single line.

FYI, you can do the same on MSDOS even if you don't have bash installed. 
If you use the port of Make 3.75, just replace the `..` with a call to the
$(shell) built-in function, like so: 

  subdir = $srcdir/*/PLUGIN
  all_subdirs = \
    $(shell cat $subdir/REQ $subdir/OPT /dev/null | tsort | xargs echo)

The difference between the two constructs is that in the last variant, the
commands are run when all_subdirs is *defined*, while in the second they
are run when all_subdirs is *used* (elsewhere in the Makefile). 

- Raw text -


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