Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Nov 1996 09:06:28 +0300 (MSK)
From:      "=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?=" (Andrey A. Chernov) <ache@nagual.ru>
To:        asami@freebsd.org (Satoshi Asami)
Cc:        CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-ports@freefall.freebsd.org
Subject:   Re: cvs commit:  ports/news/tin Makefile ports/news/tin/files md5 ports/news/tin/patches patch-aa
Message-ID:  <199611120606.JAA00748@nagual.ru>
In-Reply-To: <199611120434.UAA09559@silvia.HIP.Berkeley.EDU> from "Satoshi Asami" at "Nov 11, 96 08:34:06 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> DISTNAME=       tin1.3-unoff-BETA-961109
> PKGNAME=        tin-1.3.${DISTNAME:S/tin1.3-unoff-BETA-//}
> ===
> 
> Do you mind if I replace the second line with a regular variable
> assignment to PKGNAME?  This is causing me a lot of headaches when you 
> do an upgrade, because I need to delete the old package and its name
> is not available anywhere in the above for cut & paste. ;)

I do it to minimize typing too: now I change only
one number in distname, but with your variant I'll need to change
it in two places.

> In general, I think munging with :S and stuff for simple variables
> like PKGNAME is not a good idea.  The only times I use this is when
> the two variables are very far apart in the Makefile (and so the
> second is more likely to be forgotten when I do an upgrade) or when
> there are many things to replace.

Most complete way to not forget to change something is changing it
in one place only and let make substitutions do all other changes for you.

-- 
Andrey A. Chernov
<ache@nagual.ru>
http://www.nagual.ru/~ache/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611120606.JAA00748>