
## The real work is done in the subdirectories.
## Here we just delegate.
## Common material among the subdirectories is in Makefile.subdirs

TOPDIR = ../../..

SUBDIRS =  mjdoc_141 mjdoc_142

build-this-before: ToolsVersion.class

build-this: doablesubdirs

doablesubdirs: do141 do142 

do141:
ifdef JAVATOOLS141
	@echo BUILDING mjdoc 1.4.1 with ${JAVATOOLS141}
	@${MAKE} JAVAC="${JAVAC} -bootclasspath '${JAVATOOLS141}${JPATHSEP}`${JAVA} org.multijava.mjdoc.BootClassPath`'" CLASSPATH='${JAVATOOLS141}${JPATHSEP}${CLASSPATH}' -C mjdoc_141 classes
else
	@if test "${TOOLSVERSION}" -eq '141'; \
	then \
		echo BUILDING mjdoc 1.4.1 ; \
		${MAKE} -C mjdoc_141 classes ;\
	else \
		echo "SKIPPING mjdoc 1.4.1 since we do not have the correct version of the tools jar, nor is JAVATOOLS141 set" ;\
	fi
endif

do142:
ifdef JAVATOOLS142
	@echo BUILDING mjdoc 1.4.2 with ${JAVATOOLS142}
	@${MAKE} JAVAC="${JAVAC} -bootclasspath '${JAVATOOLS142}${JPATHSEP}`${JAVA} org.multijava.mjdoc.BootClassPath`'" CLASSPATH='${JAVATOOLS142}${JPATHSEP}${CLASSPATH}' -C mjdoc_142 classes
else
	@if test "${TOOLSVERSION}" -eq '142'; \
	then \
		echo BUILDING mjdoc 1.4.2 ;\
		${MAKE} -C mjdoc_142 classes ;\
	else \
		echo "SKIPPING mjdoc 1.4.2 since we do not have the correct version of the tools jar, nor is JAVATOOLS142 set" ;\
	fi
endif

do15:
ifdef JAVATOOLS15
	@echo BUILDING mjdoc 1.5 with ${JAVATOOLS15}
	@${MAKE} JAVAC="${JAVAC} -bootclasspath '${JAVATOOLS15}${JPATHSEP}`${JAVA} org.multijava.mjdoc.BootClassPath`'" CLASSPATH='${JAVATOOLS15}${JPATHSEP}${CLASSPATH}' -C mjdoc_15 classes
else
	@if test "${TOOLSVERSION}" -eq '15'; \
	then \
		echo BUILDING mjdoc 1.5 ;\
		${MAKE} -C mjdoc_142 classes ;\
	else \
		echo "SKIPPING mjdoc 1.5 since we do not have the correct version of the tools jar, nor is JAVATOOLS15 set" ;\
	fi
endif

TESTDIRS = 

NO_LOCAL_TESTS = 1

checkversion:
	@echo "TOOLSVERSION=${TOOLSVERSION}"

JAVAFILES = ToolsVersion Main BootClassPath MjdocGUI JavadocOptionsInterface

OPTIONS = JavadocOptions MjdocOptions 

MESSAGES = Mjdoc

include $(TOPDIR)/Make.ProjDefs
