Subject: re: SUBDIR_CHANGE (Was: SUBDIR_EXCLUDES)
To: matthew green <mrg@eterna.com.au>
From: Frederick Bruckman <fb@enteract.com>
List: tech-misc
Date: 08/20/2000 15:51:27
On Tue, 15 Aug 2000, matthew green wrote:

> the thing is, i don't want to have to create this shadow tree when i just
> want to do something once.  that's why i'd prefer this cmd-line based
> (but i wouldn't oppose having both available).

The command line thing looks easier to implement, too. As follows...


Frederick

Index: bsd.subdir.mk
===================================================================
RCS file: /cvsroot/sharesrc/share/mk/bsd.subdir.mk,v
retrieving revision 1.38
diff -c -r1.38 bsd.subdir.mk
*** bsd.subdir.mk	2000/06/06 08:54:06	1.38
--- bsd.subdir.mk	2000/08/20 20:48:46
***************
*** 10,15 ****
--- 10,25 ----
  .MAIN:		all
  .endif
  
+ .if defined(EXCLUDE_SUBDIRS)
+ .for EXCLUDE_SUBDIR in ${EXCLUDE_SUBDIRS}
+ .if ${BSDSRCDIR}/${EXCLUDE_SUBDIR:H} == ${.CURDIR}
+ SUBDIR_TO_TRIM:=	${EXCLUDE_SUBDIR:T}
+ _TMP_SUBDIR:=		${SUBDIR:N${SUBDIR_TO_TRIM}}
+ SUBDIR:=		${_TMP_SUBDIR}
+ .endif
+ .endfor
+ .endif # defined(EXCLUDE_SUBDIRS)
+ 
  .for dir in ${SUBDIR}
  .if exists(${dir}.${MACHINE})
  __REALSUBDIR+=${dir}.${MACHINE}