Date: Thu, 12 Nov 1998 14:03:06 -0800 From: Gary Kline <kline@thought.org> To: David Holland <dholland@cs.toronto.edu> Cc: joelh@gnu.org, kline@tao.thought.org, hackers@FreeBSD.ORG Subject: Re: bsd make to gnu make conversion, anyone?? Message-ID: <19981112140306.A9591@thought.org> In-Reply-To: <98Nov12.163233edt.37768-2936@qew.cs.toronto.edu>; from David Holland on Thu, Nov 12, 1998 at 04:32:30PM -0500 References: <19981112122005.C7958@thought.org> <98Nov12.163233edt.37768-2936@qew.cs.toronto.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 12, 1998 at 04:32:30PM -0500, David Holland wrote:
> >
> Another thing you can do is
>
> support.mk: Makefile
> echo $(LANGS) | awk '{ for (i=1; i<=NF; i++) print $$i;}' |\
> awk '{ printf "%s.mv.cat $$(.CURDIR)/nls/%s/mv.msg\n", $$1, $$1}' |\
> awk '{ printf "%s: %s\n\tgencat -new %s %s\n\n", \
> $$1, $$2, $$1, $$2}' > support.mk
> include support.mk
>
> There are assorted possible variations on this...
>
Something like this crossed my mind; either in
each utility makefile or in a separate file.
Putting it in a ``bsd.support.mk'' would be
cleaner. Good idea!
>
> So yeah, here's how you do subdirectories in gmake, in case anyone's
> interested:
>
> SUBDIRS=a b c d
> TARGETS=all install depend clean
>
>
> TMP1:=$(foreach dir, $(SUBDIRS), $(TARGETS))
> TMP2:=$(foreach dir, $(SUBDIRS), $(foreach tgt, $(TARGETS), $(dir)/))
> TMP3:=$(join $(TMP2), $(TMP1))
> TMP4:=$(patsubst %, %/%, $(SUBDIRS))
>
> $(TARGETS): %: $(TMP4)
>
> $(TMP3): %:
> @echo $(MAKE) -C $(patsubst %/, %, $(dir $@)) $(notdir $@)
>
>
Now where have I seen this syntax before!
gary
--
Gary D. Kline kline@tao.thought.org Public service uNix
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981112140306.A9591>
