# makefile-mrproper
# Version 0.0
# "graphein" Tools
# See http://www.CircuitousRoot.com/graphein/ for documentation.
# Copyright 2006-2008 by David M. MacMillan and Rollande Krandall.
# Based on earlier work by David M. MacMillan that was copyright 2003-2005.
#
# This work is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#    
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc.
# 59 Temple Place, Suite 330
# Boston, MA  02111-1307
# USA
# 
# Circuitous Root is a registered trademark of David M. MacMillan and 
# Rollande Krandall
# 
# Presented originally by Circuitous Root (R). http://www.CircuitousRoot.com/


SUBDIRS:= $(shell find . -mindepth 1 -maxdepth 1 -type d)

# this is really a macro, not a function call
if-subdirectory-is-traversable = \
        if [ $(1) != "./icons" ] && \
           [ $(1) != "./image-development" ] && \
           [ $(1) != "./new-static-files" ]  && \
           [ $(1) != "./notes" ]             && \
           [ $(1) != "./research" ]

all: 
	for subdirectory in $(SUBDIRS); do \
	   $(call if-subdirectory-is-traversable,$$subdirectory); then \
	      ( cd $$subdirectory; \
	      cp -f ../makefile-mrproper .; \
	      $(MAKE) --file makefile-mrproper; \
	      cd .. ); \
	   fi; \
	done
	rm -f makefile
	rm -f makefile-mrproper

