.PHONY: all mlton smlnj install
-mlton: bin/domtool-server bin/domtool-client bin/domtool-slave bin/domtool-admin
+mlton: bin/domtool-server bin/domtool-client bin/domtool-slave \
+ bin/domtool-admin bin/domtool-doc
smlnj: $(COMMON_DEPS) openssl/smlnj/FFI/libssl.h.cm src/domtool.cm
$(MAKE_MLB_BASE) >src/domtool-admin.mlb
echo "main-admin.sml" >>src/domtool-admin.mlb
+src/domtool-doc.mlb: Makefile src/prefix.mlb src/sources src/suffix.mlb
+ $(MAKE_MLB_BASE) >src/domtool-doc.mlb
+ echo "main-doc.sml" >>src/domtool-doc.mlb
+
openssl/smlnj/FFI/libssl.h.cm: openssl/openssl_sml.h
cd openssl/smlnj ; ml-nlffigen -d FFI -lh LibsslH.libh -include ../libssl-h.sml \
-cm libssl.h.cm -D__builtin_va_list="void*" \
bin/domtool-admin: $(COMMON_MLTON_DEPS) src/domtool-admin.mlb
mlton -output bin/domtool-admin -link-opt -ldl src/domtool-admin.mlb
+bin/domtool-doc: $(COMMON_MLTON_DEPS) src/domtool-doc.mlb
+ mlton -output bin/domtool-doc -link-opt -ldl src/domtool-doc.mlb
+
install:
cp scripts/domtool-publish /usr/local/sbin/
cp scripts/domtool-reset-global /usr/local/sbin/
cp bin/domtool-slave /usr/local/sbin/
cp bin/domtool-client /usr/local/bin/domtool
cp bin/domtool-admin /usr/local/bin/
+ cp bin/domtool-doc /usr/local/bin/
.PHONY: grab_lib
--- /dev/null
+(* HCoop Domtool (http://hcoop.sourceforge.net/)
+ * Copyright (c) 2006, Adam Chlipala
+ *
+ * This program 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *)
+
+(* Driver for documentation generation *)
+
+fun processArgs (args, basis, outdir, files) =
+ case args of
+ [] => (basis, outdir, files)
+ | "-basis" :: rest => processArgs (rest, true, outdir, files)
+ | "-out" :: dir :: rest => processArgs (rest, basis, dir, files)
+ | file :: rest => processArgs (rest, basis, outdir, file :: files)
+
+val _ =
+ let
+ val (basis, outdir, files) = processArgs (CommandLine.arguments (),
+ false,
+ OS.FileSys.getDir (),
+ [])
+
+ val files = if basis then
+ Main.listBasis () @ files
+ else
+ files
+ in
+ Tycheck.allowExterns ();
+ Autodoc.autodoc {outdir = outdir, infiles = files}
+ end