open-src/common/Makefile.subdirs
changeset 1422 e9cadc0026d8
parent 1036 41550074d2a3
child 1423 d7b111d2d3d7
equal deleted inserted replaced
1421:e78901f90784 1422:e9cadc0026d8
     1 # -*- Makefile -*- rules commonly shared among X consolidation open source dirs
     1 # -*- Makefile -*- rules commonly shared among X consolidation open source dirs
     2 # Makefile.subdirs has rules for recursively iterating through module subdirs
     2 # Makefile.subdirs has rules for recursively iterating through module subdirs
     3 #
     3 #
     4 # Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
     4 # Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
     5 #
     5 #
     6 # Permission is hereby granted, free of charge, to any person obtaining a
     6 # Permission is hereby granted, free of charge, to any person obtaining a
     7 # copy of this software and associated documentation files (the "Software"),
     7 # copy of this software and associated documentation files (the "Software"),
     8 # to deal in the Software without restriction, including without limitation
     8 # to deal in the Software without restriction, including without limitation
     9 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
     9 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
    34 PASSDOWN_VARS = V="$(V)" TOP="$(TOP)" CDEBUGFLAGS="$(CDEBUGFLAGS)" 
    34 PASSDOWN_VARS = V="$(V)" TOP="$(TOP)" CDEBUGFLAGS="$(CDEBUGFLAGS)" 
    35 
    35 
    36 .DEFAULT:
    36 .DEFAULT:
    37 	$(MAKE) $(MAKEFLAGS) $(PASSDOWN_VARS) subdirs OS_TARGET=$@
    37 	$(MAKE) $(MAKEFLAGS) $(PASSDOWN_VARS) subdirs OS_TARGET=$@
    38 
    38 
    39 World: clean all
    39 World: clobber all
    40 
    40 
    41 clean: clean-subdirs clean-obsolete-subdirs
    41 clean: clean-subdirs clean-obsolete-subdirs
    42 
    42 
    43 clean-subdirs:
    43 clean-subdirs:
    44 	$(MAKE) $(MAKEFLAGS) $(PASSDOWN_VARS) subdirs OS_TARGET=clean
    44 	$(MAKE) $(MAKEFLAGS) $(PASSDOWN_VARS) subdirs OS_TARGET=clean
    58 	    	if [[ -d $$i ]] ; then \
    58 	    	if [[ -d $$i ]] ; then \
    59 		    if [[ -f $$i/Makefile ]] ; then \
    59 		    if [[ -f $$i/Makefile ]] ; then \
    60 		    	$(MAKE) $(MAKEFLAGS) subdirs OS_TARGET=clean OS_SUBDIRS=$$i ; \
    60 		    	$(MAKE) $(MAKEFLAGS) subdirs OS_TARGET=clean OS_SUBDIRS=$$i ; \
    61 		    else ; \
    61 		    else ; \
    62 		    	print "## removing obsolete build directories in open-src/$(DIRNAME)$$i..."; \
    62 		    	print "## removing obsolete build directories in open-src/$(DIRNAME)$$i..."; \
    63 			($(START_CMD_ECHO) ; cd $$i && rm -rf build* .checksum* ) ; \
    63 			($(START_CMD_ECHO) ; cd $$i && rm -rf unpacked-src build* .checksum* ) ; \
    64 			($(START_CMD_ECHO) ; rmdir $$i ) ; \
    64 			($(START_CMD_ECHO) ; rmdir $$i ) ; \
    65 		    fi ; \
    65 		    fi ; \
    66 		fi ; \
    66 		fi ; \
    67 	    done ; \
    67 	    done ; \
    68 	fi ; \
    68 	fi ; \