#!/bin/sh
#require cc
#require cflags
#phase library
disp "Loading subdirectory helper functions"
subdir() {
	disp "local copy found, configuring:"
	cd $1
	disp "[ENTERING CONFIGURE PROGRAM FOR $1]"
	FM_IN_SUBDIR="y" ./configure
	disp "[EXITING CONFIGURE PROGRAM FOR $1]"
	if (test "$?" != "0"); then
		disp "subdirectory configure failed, unable to continue"
		exit 1
	fi
	cd ..
	FM_SUBDIRS="$FM_SUBDIRS $1"
	FM_CLEAN_SUBDIRS="$FM_CLEAN_SUBDIRS $1"
}

parentdir() {
	dispn "local copy found, adding to build..."
	FM_SUBDIRS="$FM_SUBDIRS $1"
	# don't clean parents, or we don't get all the way through clean
	disp "done"
}
