--- gforth/Makefile.in 2008/08/19 20:18:58 1.422 +++ gforth/Makefile.in 2008/11/09 14:35:18 1.436 @@ -45,8 +45,6 @@ EXE=@EXEEXT@ PATHSEP = @PATHSEP@ -osclass = @OSCLASS@ - EC = @EC@ # ------------- Utility programs @@ -67,6 +65,7 @@ LN_S = @LN_S@ M4 = @M4@ GCC = @CC@ EMACS = emacs +LIBTOOL = @GNU_LIBTOOL@ PREFORTH = ./preforth -p ".$(PATHSEP)~+$(PATHSEP)$(srcdir)" CC = $(GCC) FORTHPATH = .$(PATHSEP)$(libdir)/gforth/site-forth$(PATHSEP)$(siteforthdir)$(PATHSEP)$(libdir)/gforth/$(VERSION)$(PATHSEP)$(datadir)/gforth/$(VERSION) @@ -231,9 +230,11 @@ GFORTH_FI_SRC = \ hash.fs \ history.fs \ intcomp.fs \ + mkdir.fs \ libcc.fs \ locals.fs \ look.fs \ + mkdir.fs \ quotes.fs \ search.fs \ see.fs \ @@ -257,7 +258,7 @@ GFORTH_FI_SRC = \ arch/mips/testasm.fs arch/mips/testdisasm.fs \ arch/power/asm.fs arch/power/disasm.fs arch/power/inst.fs -LIBCC_SRC = cstr.fs mkdir.fs unix/socket.fs +LIBCC_SRC = cstr.fs unix/socket.fs LIBCC_DIST_SRC = libffi.fs fflib.fs $(LIBCC_SRC) @@ -268,9 +269,9 @@ FORTH_SRC = $(KERN_SRC) $(GFORTH_FI_SRC) colorize.fs comp-i.fs complex.fs \ depth-changes.fs dosekey.fs doskey.fs ds2texi.fs \ envos.dos envos.os2 etags.fs fft.fs filedump.fs fi2c.fs \ - fsl-util.4th glosgen.fs gray.fs httpd.fs proxy.fs \ - make-app.fs doc/makedoc.fs \ - locate.fs more.fs onebench.fs other.fs prims2x.fs random.fs \ + fsl-util.4th glosgen.fs gray.fs httpd.fs install-tags.fs \ + make-app.fs doc/makedoc.fs locate.fs more.fs onebench.fs \ + other.fs prims2x.fs prims2x0.6.2.fs proxy.fs random.fs \ regexp.fs sokoban.fs string.fs table.fs tags.fs \ tt.fs \ unbuffer.fs wordsets.fs xwords.fs \ @@ -472,7 +473,7 @@ GEN_PRECIOUS = $(FORTH_GEN) $(KERNLS) \ .SUFFIXES: .SUFFIXES: .c .o -all: kernel/version.fs more +all: kernel/version.fs more check # use this dependency for phony targets just as mostlyclean,... FORCE: ; @@ -489,8 +490,7 @@ version: Makefile.in configure.in kernel/version.fs: version echo ": version-string s\" $(VERSION)\" ;" > kernel/version.fs -more: $(ENGINES) $(FORTH_GEN) $(GEN) - @$(MAKE) check +more: $(ENGINES) $(FORTH_GEN) $(GEN) @build_libcc_named@ #from the gcc Makefile: #"Deletion of files made during compilation. @@ -591,7 +591,7 @@ hpux-workaround: install: gforth$(EC)$(EXE) $(FORTH_SRC) $(kernel_fi) gforth.fi gforthmi vmgen doc/gforth.1 prim install.TAGS installdirs $(NORMAL_INSTALL) touch $(DESTDIR)$(siteforthdir)/siteinit.fs - -$(RM) $(DESTDIR)$(bindir)/gforth$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-$(VERSION)$(EC)$(EXE) $(DESTDIR)$(bindir)/gforthmi #$(DESTDIR)$(bindir)/vmgen + -$(RM) $(DESTDIR)$(bindir)/gforth$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-$(VERSION)$(EC)$(EXE) $(DESTDIR)$(bindir)/gforthmi $(DESTDIR)$(bindir)/vmgen -$(RM) $(DESTDIR)$(bindir)/gforth-fast$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-fast-$(VERSION)$(EC)$(EXE) -$(RM) $(DESTDIR)$(bindir)/gforth-itc$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-itc-$(VERSION)$(EC)$(EXE) $(INSTALL_PROGRAM) gforth$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-$(VERSION)$(EC)$(EXE) @@ -603,13 +603,12 @@ install: gforth$(EC)$(EXE) $(FORTH_SRC) $(INSTALL_PROGRAM) gforth-itc$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-itc-$(VERSION)$(EC)$(EXE) (cd $(DESTDIR)$(bindir) && $(LN_S) gforth-itc-$(VERSION)$(EC)$(EXE) gforth-itc$(EC)$(EXE)) $(INSTALL_SCRIPT) gforthmi $(DESTDIR)$(bindir)/gforthmi-$(VERSION) - #$(INSTALL_SCRIPT) vmgen $(DESTDIR)$(bindir)/vmgen-$(VERSION) + $(INSTALL_SCRIPT) vmgen $(DESTDIR)$(bindir)/vmgen-$(VERSION) $(INSTALL_PROGRAM) gforth-ditc $(DESTDIR)$(libdir)/gforth/$(VERSION) (cd $(DESTDIR)$(bindir) && $(LN_S) gforthmi-$(VERSION) gforthmi) - #(cd $(DESTDIR)$(bindir) && $(LN_S) vmgen-$(VERSION) vmgen) + (cd $(DESTDIR)$(bindir) && $(LN_S) vmgen-$(VERSION) vmgen) -$(INSTALL_DATA) $(srcdir)/doc/gforth.1 $(DESTDIR)$(man1dir) - #-for i in $(srcdir)/doc/gforth.info* $(srcdir)/doc/vmgen.info*; do $(INSTALL_DATA) $$i $(DESTDIR)$(infodir); done - -for i in $(srcdir)/doc/gforth.info*; do $(INSTALL_DATA) $$i $(DESTDIR)$(infodir); done + -for i in $(srcdir)/doc/gforth.info* $(srcdir)/doc/vmgen.info*; do $(INSTALL_DATA) $$i $(DESTDIR)$(infodir); done for i in $(FORTH_SRC) $(COMPAT) prim; do \ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(datadir)/gforth/$(VERSION)/$$i; \ done @@ -621,15 +620,17 @@ install: gforth$(EC)$(EXE) $(FORTH_SRC) echo '>>>>>Please install gforth.{el,elc} in your .../emacs/site-lisp directory'; \ fi -$(RM) gforth.fi - GFORTHD="./gforth-ditc -p $(DESTDIR)$(libdir)/gforth/site-forth$(PATHSEP)$(DESTDIR)$(siteforthdir)$(PATHSEP)$(DESTDIR)$(datadir)/gforth/$(VERSION) -i $(kernel_fi)" GFORTH="./gforth-ditc --die-on-signal -i $(kernel_fi) $(STARTUP)" includedir=$(includedir) bindir=$(bindir) libccdir=$(libccdir) GFORTHPATH=.:"$$GFORTHPATH" GFORTHDESTDIR="$(DESTDIR)" ./gforthmi gforth.fi $(FORTHSIZES) $(STARTUP) + GFORTHD="./gforth-ditc -p $(DESTDIR)$(libdir)/gforth/site-forth$(PATHSEP)$(DESTDIR)$(siteforthdir)$(PATHSEP)$(DESTDIR)$(datadir)/gforth/$(VERSION) -i $(kernel_fi)" GFORTH="./gforth-ditc -p $(DESTDIR)$(libdir)/gforth/site-forth$(PATHSEP)$(DESTDIR)$(siteforthdir)$(PATHSEP)$(DESTDIR)$(datadir)/gforth/$(VERSION) --die-on-signal -i $(kernel_fi) $(STARTUP)" includedir=$(includedir) bindir=$(bindir) libccdir=$(libccdir) GFORTHPATH=.:"$$GFORTHPATH" GFORTHDESTDIR="$(DESTDIR)" ./gforthmi gforth.fi $(FORTHSIZES) $(STARTUP) $(INSTALL_DATA) gforth.fi $(DESTDIR)$(libdir)/gforth/$(VERSION) $(INSTALL_DATA) install.TAGS $(DESTDIR)$(datadir)/gforth/$(VERSION)/TAGS $(RM) gforth.fi install.TAGS $(INSTALL_DATA) include/gforth/$(VERSION)/* $(DESTDIR)$(includedir)/gforth/$(VERSION) - for i in $(LIBCC_BUILD_SRC); do @GNU_LIBTOOL@ --silent --mode=install $(INSTALL) lib/gforth/$(VERSION)/libcc-named/`basename $$i .fs`.la $(DESTDIR)$(libccdir)`basename $$i .fs`.la; done + if test -n "$(LIBTOOL)"; then for i in $(LIBCC_BUILD_SRC); do \ + $(LIBTOOL) --silent --mode=install $(INSTALL) lib/gforth/$(VERSION)/libcc-named/`basename $$i .fs`.la $(DESTDIR)$(libccdir)`basename $$i .fs`.la; \ + done; fi $(POST_INSTALL) $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gforth.info - #$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/vmgen.info + $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/vmgen.info install-strip: install @@ -647,13 +648,12 @@ installdirs: mkinstalldirs #to uninstall version foo, type `make uninstall VERSION=foo' uninstall: FORCE $(NORMAL_UNINSTALL) - -$(RM) -rf $(DESTDIR)$(libdir)/gforth/$(VERSION) $(DESTDIR)$(datadir)/gforth/$(VERSION) $(DESTDIR)$(bindir)/gforth-$(VERSION)$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-fast-$(VERSION)$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-itc-$(VERSION)$(EC)$(EXE) $(DESTDIR)$(bindir)/gforthmi-$(VERSION) $(DESTDIR)(bindir)/vmgen-$(VERSION) $(DESTDIR)$(includedir)/gforth/$(VERSION) + -$(RM) -rf $(DESTDIR)$(libdir)/gforth/$(VERSION) $(DESTDIR)$(datadir)/gforth/$(VERSION) $(DESTDIR)$(bindir)/gforth-$(VERSION)$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-fast-$(VERSION)$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-itc-$(VERSION)$(EC)$(EXE) $(DESTDIR)$(bindir)/gforthmi-$(VERSION) $(DESTDIR)$(bindir)/vmgen-$(VERSION) $(DESTDIR)$(includedir)/gforth/$(VERSION) @echo -e "To remove Gforth completely, type\n$(RM) -rf $(DESTDIR)$(bindir)/gforth$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-fast$(EC)$(EXE) $(DESTDIR)$(bindir)/gforth-itc$(EC)$(EXE) $(DESTDIR)$(bindir)/gforthmi $(DESTDIR)$(bindir)/vmgen $(DESTDIR)$(man1dir)/gforth.1 $(DESTDIR)$(infodir)/gforth.info* $(DESTDIR)$(datadir)/gforth $(DESTDIR)$(libdir)/gforth" -check-libcc-named: $(LIBCC_BUILD_SRC) +build-libcc-named: $(LIBCC_BUILD_SRC) $(FORTH_GEN) $(GEN) FORCE $(RMTREE) lib/gforth/$(VERSION)/libcc-named/ - $(srcdir)/mkinstalldirs lib/gforth/$(VERSION)/libcc-named/ - for i in $(LIBCC_BUILD_SRC); do ./gforth -e "s\" `pwd`/lib/gforth/$(VERSION)/libcc-named/\" libcc-named-dir-v 2! libcc-path clear-path libcc-named-dir libcc-path also-path :noname 2drop s\" $(libccdir)\" ; is replace-rpath" $$i -e bye; done + for i in $(LIBCC_BUILD_SRC); do ./gforth -e "s\" `pwd`/lib/gforth/$(VERSION)/libcc-named/\" libcc-named-dir-v 2! libcc-path clear-path libcc-named-dir libcc-path also-path :noname 2drop s\" $(libccdir)\" ; is replace-rpath" $(srcdir)/$$i -e bye; done check: gforths gforth.fi $(MAKE) checkone check-nofast ENGINE="./gforth --no-dynamic" >/dev/null 2>&1 @@ -662,7 +662,6 @@ check: gforths gforth.fi $(MAKE) checkone ENGINE="./gforth-fast --no-dynamic" >/dev/null 2>&1 $(MAKE) checkone check-nofast ENGINE="./gforth" >/dev/null 2>&1 $(MAKE) checkone ENGINE="./gforth-fast" >/dev/null 2>&1 - $(MAKE) check-libcc-named @echo "*** Check successful ***" ./gforth-fast --diag -e bye @@ -776,11 +775,11 @@ gforth.fi: $(kernel_fi) gforthmi gforth- # ------------- Make c-engine prim.b: prim cache0.vmg - $(M4) -Dcondbranch_opt=0 $(srcdir)/prim >$@ + (cd $(srcdir) && $(M4) -Dcondbranch_opt=0 prim) >$@ sleep 1 #should make hpux-workaround unnecessary prim-fast.b: prim cache-fast$(STACK_CACHE_DEFAULT_FAST).vmg cache-regs$(STACK_CACHE_REGS).vmg peeprules.vmg Makefile - $(M4) -Dcondbranch_opt=@condbranch_opt@ -DSTACK_CACHE_FILE=cache-fast$(STACK_CACHE_DEFAULT_FAST).vmg -DSTACK_CACHE_REGS=cache-regs$(STACK_CACHE_REGS).vmg $(srcdir)/prim >$@ + (cd $(srcdir) && $(M4) -Dcondbranch_opt=@condbranch_opt@ -DSTACK_CACHE_FILE=cache-fast$(STACK_CACHE_DEFAULT_FAST).vmg -DSTACK_CACHE_REGS=cache-regs$(STACK_CACHE_REGS).vmg prim) >$@ sleep 1 #should make hpux-workaround unnecessary $(FORTH_GEN_ENGINE_FAST): prim-fast.b prims2x.fs @@ -863,10 +862,12 @@ gforths: $(ENGINES) $(ENGINES_FAST) # ------------- additional C primitives -%.c: %.pri prim2cl.fs +.SUFFIXES: .c .pri + +.pri.c: $< prim2cl.fs $(FORTHK) prim2cl.fs -e "file $< altogether bye" >$@ -%.so: %.c +.c.so: $< $(GCC) -shared $(CFLAGS) $(CPPFLAGS) $< -o $@ # ------------- Make Documentation @@ -878,8 +879,8 @@ TAGS: gforth.TAGS tags: gforth.tags $(CP) gforth.tags $@ -install.TAGS: TAGS - sed 's;^\$(srcdir)/;;' TAGS|awk 'BEGIN {RS="\014\n"; ORS=RS} {if (NR==1) print $0; else print "$(datadir)/gforth/$(VERSION)/"$$0;}' >install.TAGS +install.TAGS: TAGS install-tags.fs + sed 's;^\$(srcdir)/;;' TAGS|./gforth -e 's" '$(datadir)/gforth/$(VERSION)/'"' $(srcdir)/install-tags.fs -e bye >install.TAGS gforth.TAGS: @kernel_fi@ gforth$(EC)$(EXE) $(GFORTH_FI_SRC) prim.TAGS kernel.TAGS $(FORTHK) etags.fs except.fs startup.fs -e bye @@ -905,10 +906,10 @@ prim.tags: prim.b prims2x.fs $(RM) $@- kernel.TAGS: - rm kernl16l$(EC).fi-; $(MAKE) @kernel_fi@ + $(RM) kernl16l$(EC).fi-; $(MAKE) @kernel_fi@ kernel.tags: - rm kernl16l$(EC).fi-; $(MAKE) @kernel_fi@ + $(RM) kernl16l$(EC).fi-; $(MAKE) @kernel_fi@ #elc files gforth.elc: gforth.el