Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jun 1995 10:35:40 -0700 (PDT)
From:      "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com>
To:        asami@cs.berkeley.edu (Satoshi Asami)
Cc:        ports@freebsd.org, jkh@freebsd.org
Subject:   Re: My wishlist
Message-ID:  <199506291735.KAA11570@gndrsh.aac.dev.com>
In-Reply-To: <199506291230.FAA02104@silvia.HIP.Berkeley.EDU> from "Satoshi Asami" at Jun 29, 95 05:30:32 am

next in thread | previous in thread | raw e-mail | index | archive | help
...
>  * > (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



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