From owner-freebsd-hackers Wed Nov 11 22:42:34 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA03666 for freebsd-hackers-outgoing; Wed, 11 Nov 1998 22:42:34 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from gershwin.tera.com ([207.224.230.28]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA03660 for ; Wed, 11 Nov 1998 22:42:30 -0800 (PST) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (tao.tera.com [207.108.223.55]) by gershwin.tera.com (8.8.8/8.8.8) with ESMTP id WAA03661; Wed, 11 Nov 1998 22:42:10 -0800 (PST) Received: (from kline@localhost) by tao.thought.org (8.8.8/8.7.3) id WAA04442; Wed, 11 Nov 1998 22:41:58 -0800 (PST) From: Gary Kline Message-Id: <199811120641.WAA04442@tao.thought.org> Subject: Re: bsd make to gnu make conversion, anyone?? In-Reply-To: <98Nov11.234727edt.37814-2936@qew.cs.toronto.edu> from David Holland at "Nov 11, 98 11:47:27 pm" To: dholland@cs.toronto.edu (David Holland) Date: Wed, 11 Nov 1998 22:41:58 -0800 (PST) Cc: hackers@FreeBSD.ORG Organization: <> thought.org: public access uNix in service... <> X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG According to David Holland: > > Are there any makefile senior Wizards out there who can clue me > > in on the translation of this pmake > > gmake doesn't have an equivalent for .for, so you're stuck with making > a mess. > As long as it works and makes some sense, that's what counts. > > > > LANGS= en_US.ISO_8859-1 fr_FR.ISO_8859-1 de_DE.ISO_8859-1 > > FILES= ${LANGS:S/$/.mv.cat/} > > CLEANFILES+= ${FILES} > > > > . > > . > > . > > > > for lang in ${LANGS} > > ${lang}.mv.cat: ${.CURDIR}/nls/${lang}/mv.msg > > gencat -new ${.TARGET} ${.ALLSRC} > > .endfor > > This you can probably do with > > %.mv.cat: ${.CURDIR}/nls/%/mv.msg > gencat -new $@ $^ > > (for some suitable replacement for ${.CURDIR}) > > > beforeinstall: > > .for lang in ${LANGS} > > ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > > ${lang}.mv.cat ${DESTDIR}${NLSDIR}/${lang}/mv.cat > > .endfor > > try > > ${patsubst %, install-%, ${LANGS}}: install-%: > ${INSTALL} -c -o root -m 644 ${patsubst install-%, %.mv.cat, $@} \ > ${DESTDIR}${NLSDIR}/${patsubst install-%, %, $@}/mv.cat > > beforeinstall: ${patsubst %, install-%, ${LANGS}} > > > but that might not work and in any event it's pretty gross. It's slightly worse than gross! > > You might be better off compiling bsd make on whatever box you're > using. > Can't. We're doing the entire BSD built using gmake. .... Is there a cleaner way using /bin/sh commands within gmake? Something like for $${lang} in $${LANGS} do .... done thanks for your input, 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