2011-07-27 07:17:02 -07:00
|
|
|
#######################################################################
|
|
|
|
# #
|
|
|
|
# MLTk, Tcl/Tk interface of OCaml #
|
|
|
|
# #
|
|
|
|
# Francois Rouaix, Francois Pessaux, Jun Furuse and Pierre Weis #
|
|
|
|
# projet Cristal, INRIA Rocquencourt #
|
|
|
|
# Jacques Garrigue, Kyoto University RIMS #
|
|
|
|
# #
|
|
|
|
# Copyright 2002 Institut National de Recherche en Informatique et #
|
|
|
|
# en Automatique and Kyoto University. All rights reserved. #
|
|
|
|
# This file is distributed under the terms of the GNU Library #
|
|
|
|
# General Public License, with the special exception on linking #
|
|
|
|
# described in file LICENSE found in the OCaml source tree. #
|
|
|
|
# #
|
|
|
|
#######################################################################
|
|
|
|
|
2002-04-26 05:16:26 -07:00
|
|
|
include ../support/Makefile.common
|
|
|
|
|
|
|
|
all: cTk.ml camltk.ml .depend
|
|
|
|
|
2007-11-06 07:16:56 -08:00
|
|
|
_tkgen.ml: ../Widgets.src ../compiler/tkcompiler$(EXE)
|
|
|
|
cd ..; $(CAMLRUNGEN) compiler/tkcompiler$(EXE) -camltk -outdir camltk
|
2002-04-26 05:16:26 -07:00
|
|
|
|
2008-08-27 03:22:42 -07:00
|
|
|
#cTk.ml camltk.ml .depend: generate
|
2007-11-22 11:01:50 -08:00
|
|
|
|
2008-08-27 03:22:42 -07:00
|
|
|
cTk.ml camltk.ml .depend: _tkgen.ml ../builtin/report.ml ../compiler/pp$(EXE) #../builtin/builtin_*.ml
|
2002-04-26 05:16:26 -07:00
|
|
|
(echo '##define CAMLTK'; \
|
2010-01-22 04:48:24 -08:00
|
|
|
echo 'include Camltkwrap'; \
|
2002-04-26 05:16:26 -07:00
|
|
|
echo 'open Widget'; \
|
2010-01-22 04:48:24 -08:00
|
|
|
echo 'open Protocol'; \
|
2002-04-26 05:16:26 -07:00
|
|
|
echo 'open Textvariable'; \
|
|
|
|
echo ; \
|
|
|
|
cat ../builtin/report.ml; \
|
|
|
|
echo ; \
|
|
|
|
cat ../builtin/builtin_*.ml; \
|
|
|
|
echo ; \
|
|
|
|
cat _tkgen.ml; \
|
|
|
|
echo ; \
|
|
|
|
echo ; \
|
|
|
|
echo 'module Tkintf = struct'; \
|
|
|
|
cat ../builtin/builtini_*.ml; \
|
|
|
|
cat _tkigen.ml; \
|
|
|
|
echo 'end (* module Tkintf *)'; \
|
|
|
|
echo ; \
|
|
|
|
echo ; \
|
|
|
|
echo 'open Tkintf' ;\
|
|
|
|
echo ; \
|
|
|
|
echo ; \
|
|
|
|
cat ../builtin/builtinf_*.ml; \
|
|
|
|
cat _tkfgen.ml; \
|
|
|
|
echo ; \
|
|
|
|
) > _cTk.ml
|
2004-11-01 22:25:03 -08:00
|
|
|
$(CAMLRUN) ../compiler/pp < _cTk.ml > cTk.ml
|
2002-04-26 05:16:26 -07:00
|
|
|
rm -f _cTk.ml
|
2007-11-06 07:16:56 -08:00
|
|
|
$(CAMLDEP) -slash -I ../support [a-z]*.mli [a-z]*.ml > .depend
|
2002-04-26 05:16:26 -07:00
|
|
|
|
2007-11-06 07:16:56 -08:00
|
|
|
../compiler/pp$(EXE):
|
|
|
|
cd ../compiler; $(MAKE) pp($EXE)
|
|
|
|
|
|
|
|
../compiler/tkcompiler$(EXE):
|
|
|
|
cd ../compiler; $(MAKE) tkcompiler($EXE)
|
2002-04-26 05:16:26 -07:00
|
|
|
|
2002-04-26 06:58:17 -07:00
|
|
|
# All .{ml,mli} files are generated in this directory
|
2002-04-26 05:16:26 -07:00
|
|
|
clean:
|
2007-11-06 07:16:56 -08:00
|
|
|
rm -f *.cm* *.ml *.mli *.$(O) *.$(A) .depend
|
2003-08-29 07:08:21 -07:00
|
|
|
# rm -f modules
|
2007-11-22 11:01:50 -08:00
|
|
|
|
|
|
|
.PHONY: all generate clean
|