# On the Silicon graphics iris machine, the syntax if test ...
# is not recognised.
# In such a case create the directories iris  and database by hand
# and run the command:   
#     make iris

.SILENT:

xace xtest suntest sunace ace emblace bibace stockace pmapace \
	sgmapace acediff homonym tace aceserver acefrontal :
	echo ; echo 'ACeDB source directory: $(ACEDB_SRC)' ; echo ;
	if test $(ACEDB_SRC)  ; then exit ; \
	else  echo  'Please setenv ACEDB_SRC (now not set) to the ACeDB source directory.' ; \
	echo	 '     Thank you' ; echo ; echo ; exit 1 ; fi
	cd $(ACEDB_SRC) ; 
	if test  $(ACEDB_MACHINE) ; then exit ; \
	else \
	echo  'To compile ACeDB, please setenv ACEDB_MACHINE (now not set) to one of: ' ; \
	cd $(ACEDB_SRC)/wmake ; echo ; ls *DEF ; \
	echo	 '      without the _DEF ending,' ; \
	echo     '      i.e.  add in your .login file the line '; \
	echo  ' setenv ACEDB_MACHINE  SUN' ; \
	echo '  or some other machine name defined in the directory wmake.' ;\
	echo '     Thank you' ; echo ; echo ; exit 1 ; fi
	if test  -f $(ACEDB_SRC)/wmake/$(ACEDB_MACHINE)_DEF	; \
	then echo 'making' $@ 'for $(ACEDB_MACHINE)'; \
	else echo  'To compile ACeDB, please setenv ACEDB_MACHINE (now = $(ACEDB_MACHINE) ) to one of: ' ; \
	cd $(ACEDB_SRC)/wmake ; echo ; ls *DEF ; \
	echo	 '      without the _DEF endding,' ; \
	echo     '      i.e.  add in your .login file the line '; \
	echo  ' setenv ACEDB_MACHINE  SUN' ; \
	echo '  or some other machine name defined in the directory wmake.' ;\
	echo '     Thank you' ; echo ; echo ; exit 1 ; fi
	if test -d $(ACEDB_SRC)/bin ; then exit ;\
	else mkdir $(ACEDB_SRC)/bin ; fi
	if test -d $(ACEDB_SRC)/database ; then exit ; else mkdir $(ACEDB_SRC)/database ; fi
	cp $(ACEDB_SRC)/wmake/truemake $(ACEDB_SRC)/bin/makefile 
	cd $(ACEDB_SRC)/bin ; $(MAKE) ACEDB_MACHINE=$(ACEDB_MACHINE) $@

iris :
	cd $(ACEDB_SRC)
	-@mkdir bin
	-@mkdir database
	cp wmake/truemake bin/makefile ; cd bin ;  $(MAKE) xace
alliant :
	cd $(ACEDB_SRC)
	-@mkdir bin
	-@mkdir database
	cp wmake/truemake bin/makefile ; cd bin ;  $(MAKE) xace

#### end of makefile
