summaryrefslogtreecommitdiffstats
path: root/otherlibs
diff options
context:
space:
mode:
authorJun FURUSE / 古瀬 淳 <jun.furuse@gmail.com>2002-02-26 13:10:58 +0000
committerJun FURUSE / 古瀬 淳 <jun.furuse@gmail.com>2002-02-26 13:10:58 +0000
commitd4a9ac525975c62e3fc64fbddd5482e64838bf77 (patch)
tree129d4cfb359053bfebb5367dec680f46d304d49b /otherlibs
parent3afa36cd11252fa25747c8d0022a67b700eaf234 (diff)
sorry the last modif is canceled
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4465 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs')
-rw-r--r--otherlibs/labltk/lib/Makefile63
-rw-r--r--otherlibs/labltk/lib/Makefile.gen21
2 files changed, 59 insertions, 25 deletions
diff --git a/otherlibs/labltk/lib/Makefile b/otherlibs/labltk/lib/Makefile
index 98b42964e..ec1e04cd3 100644
--- a/otherlibs/labltk/lib/Makefile
+++ b/otherlibs/labltk/lib/Makefile
@@ -2,32 +2,71 @@ include ../support/Makefile.common
COMPFLAGS= -I ../support
-all: labltkobjs
+SUPPORT=../support/support.cmo ../support/widget.cmo ../support/protocol.cmo \
+ ../support/textvariable.cmo ../support/timer.cmo \
+ ../support/fileevent.cmo
-opt: labltkobjsx
+SUPPORTX = $(SUPPORT:.cmo=.cmx)
+
+TOPDEPS = $(TOPDIR)/toplevel/toplevellib.cma $(TOPDIR)/toplevel/topmain.cmo
+
+all : labltk.cma labltktop$(EXE) labltk
+
+opt : labltk.cmxa
include ./modules
+WIDGETOBJSX = $(WIDGETOBJS:.cmo=.cmx)
-LABLTKOBJS = $(WIDGETOBJS) tk.cmo labltk.cmo
-LABLTKOBJSX = $(LABLTKOBJS:.cmo=.cmx)
+labltk.cma : $(SUPPORT) $(WIDGETOBJS) tk.cmo
+ $(MKLIB) -ocamlc '$(LABLC)' -o labltk -oc labltk41 \
+ $(SUPPORT) tk.cmo $(WIDGETOBJS) \
+ $(TK_LINK) $(X11_LINK)
-labltkobjs: $(LABLTKOBJS)
+labltk.cmxa : $(SUPPORTX) $(WIDGETOBJSX) tk.cmx
+ $(MKLIB) -ocamlopt '$(CAMLOPT)' -o labltk -oc labltk41 \
+ $(SUPPORTX) tk.cmx $(WIDGETOBJSX) \
+ $(TK_LINK) $(X11_LINK)
-labltkobjsx: $(LABLTKOBJSX)
+labltktop$(EXE) : $(TOPDEPS) $(WIDGETOBJS) $(SUPPORT) ../support/liblabltk41.a
+ $(LABLC) -linkall -o labltktop$(EXE) -I ../support \
+ -I $(TOPDIR)/toplevel toplevellib.cma labltk.cma \
+ -I $(OTHERS)/unix unix.cma \
+ -I $(OTHERS)/str str.cma \
+ $(DLLPATH) \
+ topmain.cmo
+
+labltk: Makefile $(TOPDIR)/config/Makefile
+ @echo Generate $@
+ @echo "#!/bin/sh" > $@
+ @echo 'exec $(LABLTKDIR)/labltktop$(EXE) -I $(LABLTKDIR) $$*' >> $@
# All .{ml,mli} files are generated in this directory
-clean:
- rm -f *.cm* *.ml *.mli *.o *.a modules .depend
+clean :
+ rm -f *.cm* *.ml *.mli *.o *.a labltktop$(EXE)
-install: $(LABLTKOBJS)
+install: labltk.cma labltktop$(EXE) labltk
if test -d $(LABLTKDIR); then : ; else mkdir $(LABLTKDIR); fi
- cp $(LABLTKOBJS:.cmo=.cmi) $(WIDGETOBJS:.cmo=.mli) $(LABLTKDIR)
+ if test `grep -s -c '^$(LABLTKDIR)$$' $(LIBDIR)/ld.conf || :` = 0; \
+ then echo $(LABLTKDIR) >> $(LIBDIR)/ld.conf; fi
+ cp $(WIDGETOBJS:.cmo=.cmi) tk.cmi $(LABLTKDIR)
+ cp labltk.cma labltktop$(EXE) $(LABLTKDIR)
chmod 644 $(LABLTKDIR)/*.cmi
+ chmod 644 $(LABLTKDIR)/labltk.cma
+ chmod 755 $(LABLTKDIR)/labltktop$(EXE)
+ @if test -d $(BINDIR); then : ; else mkdir $(BINDIR); fi
+ cp labltk $(BINDIR)
+ chmod 755 $(BINDIR)/labltk
+
-installopt: $(LABLTKOBJSX)
+installopt: labltk.cmxa
@if test -d $(LABLTKDIR); then : ; else mkdir $(LABLTKDIR); fi
- cp $(LABLTKOBJSX) $(LABLTKDIR)
+ cp $(SUPPORTX) $(WIDGETOBJSX) tk.cmx $(LABLTKDIR)
+ cp labltk.cmxa labltk.a $(LABLTKDIR)
+ cd $(LABLTKDIR); $(RANLIB) labltk.a
chmod 644 $(LABLTKDIR)/*.cmx
+ chmod 644 $(LABLTKDIR)/labltk.cmxa
+ chmod 644 $(LABLTKDIR)/labltk.a
+ @if test -d $(BINDIR); then : ; else mkdir $(BINDIR); fi
.SUFFIXES :
.SUFFIXES : .mli .ml .cmi .cmx .cmo .mlp
diff --git a/otherlibs/labltk/lib/Makefile.gen b/otherlibs/labltk/lib/Makefile.gen
index 5851a5cf0..756e704b9 100644
--- a/otherlibs/labltk/lib/Makefile.gen
+++ b/otherlibs/labltk/lib/Makefile.gen
@@ -2,12 +2,12 @@ include ../support/Makefile.common
all: tk.ml .depend
-_tkgen.ml: ../Widgets.src ../compiler/tkcompiler
- cd ..; ../../boot/ocamlrun compiler/tkcompiler -outdir labltk
+tkgen.ml: ../Widgets.src ../compiler/tkcompiler
+ cd ..; ../../boot/ocamlrun compiler/tkcompiler
# dependencies are broken: wouldn't work with gmake 3.77
-tk.ml labltk.ml .depend: _tkgen.ml ../builtin/report.ml ../compiler/pp #../builtin/builtin_*.ml
+tk.ml .depend: tkgen.ml ../builtin/report.ml #../builtin/builtin_*.ml
(echo 'open StdLabels'; \
echo 'open Widget'; \
echo 'open Protocol'; \
@@ -15,12 +15,12 @@ tk.ml labltk.ml .depend: _tkgen.ml ../builtin/report.ml ../compiler/pp #../built
echo 'open Textvariable'; \
cat ../builtin/report.ml; \
cat ../builtin/builtin_*.ml; \
- cat _tkgen.ml; \
+ cat tkgen.ml; \
echo ; \
echo ; \
echo 'module Tkintf = struct'; \
cat ../builtin/builtini_*.ml; \
- cat _tkigen.ml; \
+ cat tkigen.ml; \
echo 'end (* module Tkintf *)'; \
echo ; \
echo ; \
@@ -28,12 +28,7 @@ tk.ml labltk.ml .depend: _tkgen.ml ../builtin/report.ml ../compiler/pp #../built
echo ; \
echo ; \
cat ../builtin/builtinf_*.ml; \
- cat _tkfgen.ml; \
+ cat tkfgen.ml; \
echo ; \
- ) > _tk.ml
- ../../../boot/ocamlrun ../compiler/pp < _tk.ml > tk.ml
- rm -f _tk.ml
- $(LABLDEP) -I ../support ../support/*.mli [a-z]*.mli [a-z]*.ml > .depend
-
-../compiler/pp:
- cd ../compiler; $(MAKE) pp
+ ) > tk.ml
+ $(LABLDEP) *.mli *.ml > .depend