JDK libraries build question: propagating a new make variable/value
    Steve Bohne 
    Stephen.Bohne at Sun.COM
       
    Fri Apr 18 15:26:55 UTC 2008
    
    
  
This is hopefully an easy question for JDK libraries build experts.
I want to pass along a new make variable/value to all sub-makes during 
the JDK build.  Currently each Makefile is edited to pass it to all 
subdirectories.  I have to make this change in every Makefile in every 
non-leaf directory:
all optimized debug clean clobber ::
   @for i in $(SUBDIRS) ; do \
     $(ECHO) ">>>Recursively making "$$i" "$@" @ `$(DATE)` ..."; \
     $(CD) $$i; $(MAKE) $@ RELEASE=$(RELEASE) FULL_VERSION=$(FULL_VERSION) \
+     NEW_VAR=$(NEW_VAR) \
       || exit 1; $(CD) ..;  \
     $(ECHO) "<<<Finished Recursively making "$$i" "$@" @ `$(DATE)`." ;
   done
Is there an easier way that doesn't touch so many Makefiles?
Is there perhaps a Makefile that gets generated during the build and 
included everywhere?  Or a way to use MFLAGS/MAKEFLAGS to pass it along?
Any tips are appreciated.
Thanks,
Steve
    
    
More information about the build-dev
mailing list