From owner-freebsd-ports Thu Jun 29 10:35:47 1995 Return-Path: ports-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id KAA02116 for ports-outgoing; Thu, 29 Jun 1995 10:35:47 -0700 Received: from gndrsh.aac.dev.com (gndrsh.aac.dev.com [198.145.92.241]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id KAA02105 ; Thu, 29 Jun 1995 10:35:43 -0700 Received: (from rgrimes@localhost) by gndrsh.aac.dev.com (8.6.11/8.6.9) id KAA11570; Thu, 29 Jun 1995 10:35:40 -0700 From: "Rodney W. Grimes" Message-Id: <199506291735.KAA11570@gndrsh.aac.dev.com> Subject: Re: My wishlist To: asami@cs.berkeley.edu (Satoshi Asami) Date: Thu, 29 Jun 1995 10:35:40 -0700 (PDT) Cc: ports@freebsd.org, jkh@freebsd.org In-Reply-To: <199506291230.FAA02104@silvia.HIP.Berkeley.EDU> from "Satoshi Asami" at Jun 29, 95 05:30:32 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 2776 Sender: ports-owner@freebsd.org Precedence: bulk ... > * > (3) Convert subdir Makefiles into "SUBDIR += port1" "SUBDIR += port2" > * > format instead of "SUBDIR = port1 port2 port3" > * > * Why? The current /usr/src tree does not do this, and it may slow > * down make slighly more vs a \ continued line. I don't see the > * advantage to this, is there one? > > Hehe. You said this is "Another Good Idea (TM)" when I proposed it a > while ago. The idea is it's easier to add/delete things, harder to > screw up the order, and I want to eventually turn this into something > like (combined with (11) further down the list): > > BROKEN += a_broken_port > SUBDIR += a_good_port > RESTRICTED += cryptic_port > SUBDIR += great_port > SUBDIR += some_port > RESTRICTED += what_a_jerk > > (Note the rhs is in alphabetical order) Yea, right, forgot about all this mixed mode subdir stuff, this is another good idea then! Sorry for going back on what I had before, but without this other context it was a toss up. > > * > (8) DISTDIR -> DISTPATH > * > > * > I know Jordan's been needling my backside about this for a long > * > time, I simply can't come up with a good idea on how to handle it > * > in bsd.port.mk.... > * for i in ${DISTPATH}; do > * if [ -f ${i}/${DISTFILE}... > > It's ${DISTFILES}, note the plural. Also, do we want to do the check > on every stage (fetch, checksum, extract)? If not, we'll have to > remember the dir/file pair for every component of ${DISTFILES}. _DISTFILE_USE: .USE for i in ${DISTPATH}; do \ for j in ${DISTFILES}; do \ if [ -f ${i}/${j} ]; then \ .if target(fetch) [whatever we do to fetch it] \ [Well, we don't fetch if we found it :-), so ``found_it=true;''] .endif .if target(checksum) [whatever we do to checksum it] \ [or perhaps ${MAKE} single_checksum DISTFILE_IS=${i}/{j}] .endif .if target(extract) [whatever we do to extract it] \ [or perhaps ${MAKE} single_extract DISTFILE_IS=${i}/{j}] .endif ... \ fi; \ done; \ done; \ if [ x"${found_it} != x"true" ]; then \ ${MAKE} single_fetch; \ fi; fetch checksum extract: _DISTFILE_USE Since this rolls all three similiar targets into one .USE subroutine there is no duplicated code :-). No need to repeat the search with the above code, since it handles it for you already :-). > Also, if it's not on the system, we need to put it into the first > writable directory. Etc., etc., too many complications, and mk macros > are just not powerful enough to write these stuff without major > hackery.... See above :-). -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Reliable computers for FreeBSD