diff options
author | Jun FURUSE / 古瀬 淳 <jun.furuse@gmail.com> | 2002-02-26 12:58:03 +0000 |
---|---|---|
committer | Jun FURUSE / 古瀬 淳 <jun.furuse@gmail.com> | 2002-02-26 12:58:03 +0000 |
commit | 3afa36cd11252fa25747c8d0022a67b700eaf234 (patch) | |
tree | c34139732fbabfe78c95282e99fa78a9acce5e04 | |
parent | 7e549f280ef7c08777767f8725d3783b49e5d7bf (diff) |
lib -> labltk
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4463 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | otherlibs/labltk/lib/Makefile | 63 | ||||
-rw-r--r-- | otherlibs/labltk/lib/Makefile.gen | 21 |
2 files changed, 25 insertions, 59 deletions
diff --git a/otherlibs/labltk/lib/Makefile b/otherlibs/labltk/lib/Makefile index ec1e04cd3..98b42964e 100644 --- a/otherlibs/labltk/lib/Makefile +++ b/otherlibs/labltk/lib/Makefile @@ -2,71 +2,32 @@ include ../support/Makefile.common COMPFLAGS= -I ../support -SUPPORT=../support/support.cmo ../support/widget.cmo ../support/protocol.cmo \ - ../support/textvariable.cmo ../support/timer.cmo \ - ../support/fileevent.cmo +all: labltkobjs -SUPPORTX = $(SUPPORT:.cmo=.cmx) - -TOPDEPS = $(TOPDIR)/toplevel/toplevellib.cma $(TOPDIR)/toplevel/topmain.cmo - -all : labltk.cma labltktop$(EXE) labltk - -opt : labltk.cmxa +opt: labltkobjsx include ./modules -WIDGETOBJSX = $(WIDGETOBJS:.cmo=.cmx) -labltk.cma : $(SUPPORT) $(WIDGETOBJS) tk.cmo - $(MKLIB) -ocamlc '$(LABLC)' -o labltk -oc labltk41 \ - $(SUPPORT) tk.cmo $(WIDGETOBJS) \ - $(TK_LINK) $(X11_LINK) +LABLTKOBJS = $(WIDGETOBJS) tk.cmo labltk.cmo +LABLTKOBJSX = $(LABLTKOBJS:.cmo=.cmx) -labltk.cmxa : $(SUPPORTX) $(WIDGETOBJSX) tk.cmx - $(MKLIB) -ocamlopt '$(CAMLOPT)' -o labltk -oc labltk41 \ - $(SUPPORTX) tk.cmx $(WIDGETOBJSX) \ - $(TK_LINK) $(X11_LINK) +labltkobjs: $(LABLTKOBJS) -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) $$*' >> $@ +labltkobjsx: $(LABLTKOBJSX) # All .{ml,mli} files are generated in this directory -clean : - rm -f *.cm* *.ml *.mli *.o *.a labltktop$(EXE) +clean: + rm -f *.cm* *.ml *.mli *.o *.a modules .depend -install: labltk.cma labltktop$(EXE) labltk +install: $(LABLTKOBJS) if test -d $(LABLTKDIR); then : ; else mkdir $(LABLTKDIR); fi - 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) + cp $(LABLTKOBJS:.cmo=.cmi) $(WIDGETOBJS:.cmo=.mli) $(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: labltk.cmxa +installopt: $(LABLTKOBJSX) @if test -d $(LABLTKDIR); then : ; else mkdir $(LABLTKDIR); fi - cp $(SUPPORTX) $(WIDGETOBJSX) tk.cmx $(LABLTKDIR) - cp labltk.cmxa labltk.a $(LABLTKDIR) - cd $(LABLTKDIR); $(RANLIB) labltk.a + cp $(LABLTKOBJSX) $(LABLTKDIR) 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 756e704b9..5851a5cf0 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 +_tkgen.ml: ../Widgets.src ../compiler/tkcompiler + cd ..; ../../boot/ocamlrun compiler/tkcompiler -outdir labltk # dependencies are broken: wouldn't work with gmake 3.77 -tk.ml .depend: tkgen.ml ../builtin/report.ml #../builtin/builtin_*.ml +tk.ml labltk.ml .depend: _tkgen.ml ../builtin/report.ml ../compiler/pp #../builtin/builtin_*.ml (echo 'open StdLabels'; \ echo 'open Widget'; \ echo 'open Protocol'; \ @@ -15,12 +15,12 @@ tk.ml .depend: tkgen.ml ../builtin/report.ml #../builtin/builtin_*.ml 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,7 +28,12 @@ tk.ml .depend: tkgen.ml ../builtin/report.ml #../builtin/builtin_*.ml echo ; \ echo ; \ cat ../builtin/builtinf_*.ml; \ - cat tkfgen.ml; \ + cat _tkfgen.ml; \ echo ; \ - ) > tk.ml - $(LABLDEP) *.mli *.ml > .depend + ) > _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 |