--- gforth/Makefile.in 2012/06/27 20:49:34 1.479 +++ gforth/Makefile.in 2012/07/23 12:49:06 1.484 @@ -48,6 +48,7 @@ PATHSEP = @PATHSEP@ EC = @EC@ ARCH= @ARCH@ EXT = $(EC)$(ARCH)$(EXE) +LA = $(EC)$(ARCH).la # ------------ Install Directories @@ -88,7 +89,7 @@ MASSAGE_EXE = @MASSAGE_EXE@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ -LN_S = @LN_S@ +LN_S = @LN_S@ -f M4 = @M4@ GCC = @CC@ EMACS = @EMACS@ @@ -237,6 +238,7 @@ GFORTH_FI_SRC2=\ hash.fs \ history.fs \ intcomp.fs \ + i18n.fs \ mkdir.fs \ libcc.fs \ locals.fs \ @@ -256,6 +258,7 @@ GFORTH_FI_SRC2=\ struct.fs \ struct0x.fs \ stuff.fs \ + substitute.fs \ tasker.fs \ termsize.fs \ utf-8.fs \ @@ -527,7 +530,7 @@ version: Makefile.in configure.in kernel/version.fs: version echo ": version-string s\" $(VERSION)\" ;" > kernel/version.fs -more: $(ENGINES) $(FORTH_GEN) $(GEN) @build_libcc_named@ +more: $(ENGINES) $(FORTH_GEN) $(GEN) @libengines@ @build_libcc_named@ #from the gcc Makefile: #"Deletion of files made during compilation. @@ -559,7 +562,8 @@ docclean: FORCE doc/gforth.toc doc/gforth.tp doc/gforth.vr html clean: mostlyclean - -$(RM) -rf $(GEN) *.o engine/*.o arch/*/*.o version \ + -$(RM) -rf $(GEN) *.o engine/*.o engine/*.lo engine/*.la \ + engine/.libs engine/libgforth* libgforth* arch/*/*.o version \ gforth-itc-noll$(EXT) engine/gforth-itc-noll$(EXT) \ gforth-ditc-noll$(EXT) engine/gforth-ditc-noll$(EXT) \ gforth-prof-noll$(EXT) engine/gforth-prof-noll$(EXT) \ @@ -628,7 +632,7 @@ hpux-workaround: #hard to generate). #we rebuild gforth.fi, because it contains some path names. #we delete $build/gforth.fi and $build/install.TAGS after installation because of ownership. -install: gforth$(EXT) $(FORTH_SRC) $(kernel_fi) gforthmi vmgen doc/gforth.1 prim install.TAGS installdirs @NO_CROSS@ gforth.fi +install: gforth$(EXT) $(FORTH_SRC) $(kernel_fi) gforthmi vmgen doc/gforth.1 prim install.TAGS installdirs @libinstall@ @NO_CROSS@ gforth.fi $(NORMAL_INSTALL) touch $(DESTDIR)$(siteforthdir)/siteinit.fs -$(RM) $(DESTDIR)$(bindir)/gforth$(EXT) $(DESTDIR)$(bindir)/gforth-$(VERSION)$(EXT) $(DESTDIR)$(bindir)/gforthmi $(DESTDIR)$(bindir)/vmgen @@ -667,9 +671,9 @@ install: gforth$(EXT) $(FORTH_SRC) $(ker @NO_CROSS@$(INSTALL_DATA) gforth.fi $(DESTDIR)$(libdir)/gforth$(ARCH)/$(VERSION) $(INSTALL_DATA) install.TAGS $(DESTDIR)$(datadir)/gforth/$(VERSION)/TAGS $(RM) install.TAGS @NO_CROSS@gforth.fi - $(INSTALL_DATA) include/gforth/$(VERSION)/* $(DESTDIR)$(includedir)/gforth/$(VERSION) + $(INSTALL_DATA) include/gforth$(ARCH)/$(VERSION)/* $(DESTDIR)$(includedir)/gforth$(ARCH)/$(VERSION) if test -n "$(LIBTOOL)"; then for i in $(LIBCC_BUILD_SRC); do \ - $(LIBTOOL) --silent --mode=install $(INSTALL) lib/gforth$(ARCH)/$(VERSION)/libcc-named/`basename $$i .fs`.la $(DESTDIR)$(libccdir)`basename $$i .fs`.la; \ + $(LIBTOOL) --silent --mode=install $(INSTALL) lib/gforth$(ARCH)/$(VERSION)/libcc-named/lib`basename $$i .fs`.la $(DESTDIR)$(libccdir)lib`basename $$i .fs`.la; \ done; fi $(POST_INSTALL) $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gforth.info @@ -677,9 +681,14 @@ install: gforth$(EXT) $(FORTH_SRC) $(ker install-strip: install +libinstall: $(ENGINES:%$(EXT)=lib%) $(ENGINES_FAST:%$(EXT)=lib%) + for i in $(ENGINES:%$(EXT)=lib%) $(ENGINES_FAST:%$(EXT)=lib%); do \ + $(LIBTOOL) --silent --mode=install $(INSTALL) engine/$$i.la $(libdir)/$$i.la; \ + done + installdirs: mkinstalldirs $(NORMAL_INSTALL) - for i in $(bindir) $(man1dir) $(infodir) $(libdir)/gforth$(ARCH)/$(VERSION) $(datadir)/gforth/$(VERSION) $(libdir)/gforth/site-forth $(siteforthdir) $(includedir)/gforth/$(VERSION) $(libccdir); do \ + for i in $(bindir) $(man1dir) $(infodir) $(libdir)/gforth$(ARCH)/$(VERSION) $(datadir)/gforth/$(VERSION) $(libdir)/gforth/site-forth $(siteforthdir) $(includedir)/gforth$(ARCH)/$(VERSION) $(libccdir); do \ $(srcdir)/mkinstalldirs $(DESTDIR)$$i; \ done # @@ -872,7 +881,7 @@ gforth-fast$(OPT)$(EXT): $(ENGINE_SOURCE if test -z "$(OPT)"; then \ for i in $(OPTS); do $(MAKE) optgforth-fast OPT=$$i && $(CP) gforth-fast$${i}$(EXT) $@ && break; done; \ else \ - ( cd engine && $(MAKE) $@ ) && \ + (cd engine && $(MAKE) $@ ) && \ $(CP) engine/$@ $@ && \ $(MASSAGE_EXE) $@; \ @GFORTHFAST_EXE@; \ @@ -903,6 +912,46 @@ gforth-prof$(EXT): $(ENGINE_SOURCES) $(F gforths: $(ENGINES) $(ENGINES_FAST) +#For now, we have no way to check if the engines build correctly +libgforth$(OPT)$(EXT): $(ENGINE_SOURCES) $(FORTH_GEN_ENGINE) engine/config.h @kernel_anti_dependence@ + if test -z "$(OPT)"; then \ + for i in $(OPTS); do $(MAKE) optlibgforth OPT=$$i && $(MAKE) optlibgforth2 OPT=$$i && $(LN_S) engine/$@ $@ && break; done; \ + else \ + (cd engine && $(MAKE) $@ ); \ + @NO_CROSS@ $(MAKE) checkone check-nofast ENGINE=./engine/$@; \ + fi + +optlibgforth: + $(MAKE) libgforth$(OPT)$(EXT) $(MAKELINE$(OPT)) + +optlibgforth2: + (cd engine && $(MAKE) libgforth$(EXT) $(MAKELINE$(OPT))) + +libgforth-fast$(OPT)$(EXT): $(ENGINE_SOURCES) $(FORTH_GEN_ENGINE_FAST) engine/config.h + if test -z "$(OPT)"; then \ + for i in $(OPTS); do $(MAKE) optlibgforth-fast OPT=$$i && $(MAKE) optlibgforth-fast2 OPT=$$i && $(LN_S) engine/$@ $@ && break; done; \ + else \ + (cd engine && $(MAKE) $@ ); \ + @NO_CROSS@ $(MAKE) checkone ENGINE=./engine/$@; \ + fi + +optlibgforth-fast: + $(MAKE) libgforth-fast$(OPT)$(EXT) $(MAKELINE$(OPT)) + +optlibgforth-fast2: + (cd engine && $(MAKE) libgforth-fast$(EXT) $(MAKELINE$(OPT))) + +libgforth-itc$(EXT): $(ENGINE_SOURCES) $(FORTH_GEN_ENGINE) engine/Makefile engine/config.h + cd engine && $(MAKE) libgforth-itc$(EXT) $(MAKELINE-noll) + +libgforth-ditc$(EXT): $(ENGINE_SOURCES) $(FORTH_GEN_ENGINE) engine/Makefile engine/config.h + cd engine && $(MAKE) libgforth-ditc$(EXT) $(MAKELINE-noll) + +libgforth-prof$(EXT): $(ENGINE_SOURCES) $(FORTH_GEN_ENGINE) engine/Makefile engine/config.h + cd engine && $(MAKE) libgforth-prof$(EXT) $(MAKELINE-noll) + +libgforths: $(ENGINES:%$(EXT)=lib%) $(ENGINES_FAST:%$(EXT)=lib%) + # ------------- additional C primitives .SUFFIXES: .c .pri