#$OpenXM: OpenXM/src/asir-contrib/packages/doc/Makefile.in,v 1.30 2019/03/28 02:53:09 noro Exp $
RM=rm -f

LANGUAGES = en ja

bindir=/amd/orange2b/usr/home/home01/taka/OX4L/asir-2018/OpenXM/misc/packages/Linux/Debian2/work/OpenXM/bin
LIBDIR=/amd/orange2b/usr/home/home01/taka/OX4L/asir-2018/OpenXM/misc/packages/Linux/Debian2/work/OpenXM/lib/asir
DOCDIR=/amd/orange2b/usr/home/home01/taka/OX4L/asir-2018/OpenXM/misc/packages/Linux/Debian2/work/OpenXM/doc/asir-contrib
DOCDIRTOP=/amd/orange2b/usr/home/home01/taka/OX4L/asir-2018/OpenXM/misc/packages/Linux/Debian2/work/OpenXM/doc

SUBDIRS=dsolv gnuplot mathematica ok_diff ok_dmodule om \
   pfpcoh phc plucker sm1 tigers \
   todo_parametrize f_res taji_alc top noro_matrix mt_graph nn_ndbf noro_mwl noro_pd \
   ns_twistedlog nk_fb_gen_c gtt_ekn n_wishartd noro_module_syz noro_grcrt


all :
	@if [ ! -f ./.build_done ] ; then \
		for i in ${SUBDIRS}; do (cp texinfo*.tex txi-ja.tex $$i; cd $$i && ${MAKE}); done ; \
	    touch ./.build_done ; \
	fi

install: install-help install-document

install-help: all
	@if [ ! -f ./.install_help_done ] ; then \
		for i in ${SUBDIRS}; do (cd $$i && ${MAKE} install-help); done ; \
	    touch ./.install_help_done ; \
	else \
	    echo "NOTE: Installation of document is already done. Remove .install_help_done for a new installation." ; \
	fi

install-document: all
	@if [ ! -f ./.install_doc_done ] ; then \
		for i in ${SUBDIRS}; do (cd $$i && ${MAKE} install-document); done ; \
		install -m 0644 asir-doc-top.html ${DOCDIRTOP} ; \
	    touch ./.install_doc_done ; \
	else \
	    echo "NOTE: Installation of document is already done. Remove .install_doc_done for a new installation." ; \
	fi

clean:
	for i in ${SUBDIRS}; do (cd $$i; ${RM} -f texinfo*.tex txi-ja.tex ; ${MAKE} clean); done

distclean: clean
	-for j in ${LANGUAGES}; do \
		${RM} -r ${LIBDIR}/help-$$j/xm.help ; \
	done
	-${RM} -r ${DOCDIR}
	-${RM} -r ./.*done config.log config.status autom4te.cache 
	-${RM} Makefile M/Makefile
