## Process this file with automake to produce Makefile.in # Copyright 1998,1999 Zanshin Inc. # The contents of this file are subject to the Zanshin Public License Version # 1.0 (the "License"); you may not use this file except in compliance with the # License. You should have received a copy of the License with Latte; see the # file COPYING. You may also obtain a copy of the License at # . # # Software distributed under the License is distributed on an "AS IS" basis, # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for # the specific language governing rights and limitations under the License. # # The Original Code is Latte. # # The Initial Developer of the Original Code is Zanshin, Inc. AUTOMAKE_OPTIONS = dist-shar 1.3 SUBDIRS = doc tests ## Installation objects bin_PROGRAMS = latte-html latte-text lib_LTLIBRARIES = liblatte.la pkginclude_HEADERS = latte.h latte-conf.h latte-deque.h latte-fstream.h \ latte-iosfwd.h latte-log.h latte-stack.h latte-string.h \ latte-vector.h memo.h mutable.h refcount.h restorer.h \ shdeque.h shstring.h latte-html.h latte-text.h pkgdata_DATA = html.latte text.latte standard.latte lisp_LISP = latte.el ## Distribution objects EXTRA_DIST = COPYING.LIB FlexLexer.h getopt.c getopt.h getopt1.c grammar.cxx \ grammar.tab.h grammar.y html-latte.pl html.latte latte.el \ standard.latte syntax.cxx syntax.lxx text.latte if BUILD_GETOPT GETOPT_SRCS = getopt.c getopt1.c GETOPT_OBJS = getopt.o getopt1.o else GETOPT_SRCS = GETOPT_OBJS = endif ## Details BUILT_SOURCES = conf.cxx grammar.cxx syntax.cxx latte_html_SOURCES = latte-html.cxx latte-html-cli.cxx $(GETOPT_SRCS) latte_html_LDADD = liblatte.la -lstdc++ latte_text_SOURCES = latte-text.cxx latte-text-cli.cxx $(GETOPT_SRCS) latte_text_LDADD = liblatte.la -lstdc++ liblatte_la_SOURCES = activation.cxx assignment.cxx boolean.cxx closure.cxx \ conf.cxx definitions.cxx env.cxx fileloc.cxx \ grammar.cxx group.cxx latte.cxx latte-log.cxx \ latte-string.cxx list.cxx load.cxx memo.cxx nested.cxx \ operator.cxx param.cxx quote.cxx reader.cxx \ shstring.cxx str.cxx syntax.cxx tangible.cxx \ varref.cxx visitor.cxx wsnode.cxx wstate.cxx liblatte_la_LDFLAGS = -version-info @LIBLATTE_VERSION@ LATTE_URL = @LATTE_URL@ ETAGS_ARGS = --c++ conf.cxx: config.status -rm -f $@ (echo '// Automatically generated by Latte makefile'; \ echo 'extern const char latte_pkgdatadir[] = "$(pkgdatadir)";' ; \ echo 'extern const char latte_version[] = "$(VERSION)";'; \ echo 'extern const char latte_url[] = "$(LATTE_URL)";') > $@ grammar.tab.h grammar.cxx: grammar.y -rm -f grammar.tab.c grammar.tab.h grammar.cxx bison -d -p latte $< mv grammar.tab.c grammar.cxx @rm -f grammar.tab.c syntax.cxx: syntax.lxx -rm -f $@ $@.tmp flex -B -o$@ $< sed 's/^class istream;/#include /' $@ > $@.tmp mv $@.tmp $@ dist-hook: @echo " " @echo " If this is a real distribution, did you remember to:" @echo " - Update VERSION (in AM_INIT_AUTOMAKE in configure.in)?" @echo " - Update LIBLATTE_VERSION (in configure.in)?" @echo " - Reset RPM_REV (in configure.in)?" @echo " - Update NEWS?" @echo " - Make sure conf.cxx is up to date?" @echo " - make distcheck?" @echo " - Update ChangeLog?" @echo " - cvs tag the sources?" @echo " - Update the Latte website?" @echo " - Notify latte mailing list subscribers?" @echo " " # Tweak the source for other platforms win-src: distdir cd $(distdir); \ cr=`echo "" | tr '\012' '\015'`; \ for name in standard html; \ do \ (sed 's/$$/'"$$cr"'/' < $$name.latte > $$name.lat \ && rm $$name.latte); \ done; \ for file in AUTHORS COPYING NEWS README TODO; \ do \ (sed 's/$$/'"$$cr"'/' < $$file > $$file.win \ && mv $$file.win $$file); \ done; \ cd doc; \ for name in latte liblatte; \ do \ (sed 's/$$/'"$$cr"'/' < $$name.info > $$name.inf \ && rm $$name.info); \ done; \ cd ../tests; \ for file in *.exp; \ do \ (sed 's/$$/'"$$cr"'/' < $$file > $$file.win \ && mv $$file.win $$file); \ done win-dist: latte.zip latte.zip: win-distdir -rm -f latte.zip zip -r latte latte -rm -rf latte win-distdir: win-src latte-$(VERSION).exe -rm -rf latte mkdir latte rm -f latte/latte.exe; ln latte-$(VERSION).exe latte/latte.exe for file in standard.lat html.lat; \ do \ rm -f latte/$$file; ln $(distdir)/$$file latte/$$file; \ done for file in AUTHORS COPYING NEWS README TODO; \ do \ rm -f latte/$$file.txt; ln $(distdir)/$$file latte/$$file.txt; \ done rm -f latte/latte.inf; ln $(distdir)/doc/latte.inf latte/latte.inf rm -f latte/liblatte.inf; ln $(distdir)/doc/liblatte.inf latte/liblatte.inf -rm -rf $(distdir) mac-src: distdir cd $(distdir); \ for file in standard.latte html.latte; \ do \ (tr '\012' '\015' < $$file > $$file.mac && mv $$file.mac $$file); \ done; \ cd tests; \ for file in *.exp; \ do \ (tr '\012' '\015' < $$file > $$file.mac && mv $$file.mac $$file); \ done # REDHAT PACKAGE MANAGER section # # RPM files are built by the "rpm" program by parsing a "spec" file. # The entire build must be able to run unsupervised from within "rpm". if BUILD_SHARED LDCONFIG_REQ = Requires: ldconfig LDCONFIG_RUN = /sbin/ldconfig STATIC_ERROR = LDFLAGS=$(LDFLAGS) requires configure --enable-static STATIC_TEST = case "$(LDFLAGS)" in \ *-static*) \ echo >&2 "error: $(STATIC_ERROR)"; \ false;; \ *) true;; \ esac else LDCONFIG_REQ = LDCONFIG_RUN = STATIC_TEST = true endif # Some variables needed by latte.spec are not available at configure time. $(PACKAGE).spec: Makefile $(PACKAGE).spec.in lib$(PACKAGE).la @$(STATIC_TEST) -rm -f $@ @. $(top_builddir)/lib$(PACKAGE).la ; \ echo "sed < $@.in > $@" ; \ sed < $@.in > $@ \ -e 's%#PACKAGE#%$(PACKAGE)%g' \ -e 's%#VERSION#%$(VERSION)%g' \ -e 's%#RPM_REV#%$(RPM_REV)%g' \ -e 's%#LATTE_URL#%$(LATTE_URL)%g' \ -e 's%#LDFLAGS#%$(LDFLAGS)%g' \ -e 's%#LDCONFIG_REQ#%$(LDCONFIG_REQ)%g' \ -e 's%#LDCONFIG_RUN#%$(LDCONFIG_RUN)%g' \ -e 's%#prefix#%$(prefix)%g' \ -e 's%#libdir#%$(libdir)%g' \ -e 's%#infodir#%$(infodir)%g' \ -e 's%#pkgdatadir#%$(pkgdatadir)%g' \ -e 's%#pkglibdir#%$(pkglibdir)%g' \ -e 's%#pkgincludedir#%$(pkgincludedir)%g' \ -e 's%#CONFIGURE_ARGS#%$(CONFIGURE_ARGS)%g' \ -e "s%#LIBLATTE_A#%$(libdir)/$$old_library%g" \ -e h \ `for f in $(bin_PROGRAMS); do \ echo " -e s%#BINPROGRAMS#%$(bindir)/$$f%gp"; \ echo " -e g"; \ done` \ -e '/#BINPROGRAMS#/d' \ `for f in $(pkginclude_HEADERS); do \ echo " -e s%#PKGINCLUDES#%$(pkgincludedir)/$$f%gp"; \ echo " -e g"; \ done` \ -e '/#PKGINCLUDES#/d' \ `for f in $(lib_LTLIBRARIES); do \ echo " -e s%#LIBLATTE_LA#%$(libdir)/$$f%gp"; \ echo " -e g"; \ done` \ -e '/#LIBLATTE_LA#/d' \ `for f in $$library_names; do \ echo " -e s%#LIBLATTE_SO#%$(libdir)/$$f%gp"; \ echo " -e g"; \ done` \ -e '/#LIBLATTE_SO#/d' \ `for f in $(lisp_LISP); do \ echo " -e s%#LATTELISP#%$(lispdir)/$$f%gp"; \ echo " -e g"; \ done` \ -e '/#LATTELISP#/d' \ `for f in $(pkgdata_DATA); do \ echo " -e s%#PKGDATA#%$(pkgdatadir)/$$f%gp"; \ echo " -e g"; \ done` \ -e '/#PKGDATA#/d' # RPM won't build the .src.rpm without verifying that the binary .rpm can # also be successfully compiled. So the binaries depend on the source, # and all the build rules for both are under the source target. $(PACKAGE)-$(VERSION)-$(RPM_REV).i386.rpm \ $(PACKAGE)-$(VERSION)-$(RPM_REV).i686.rpm \ $(PACKAGE)-$(VERSION)-$(RPM_REV).ppc.rpm \ $(PACKAGE)-$(VERSION)-$(RPM_REV).sparc.rpm \ $(PACKAGE)-$(VERSION)-$(RPM_REV).alpha.rpm : $(PACKAGE)-$(VERSION)-$(RPM_REV).src.rpm @-test -f $@ || $(MAKE) $(PACKAGE)-rpm @test -f $@ $(PACKAGE)-$(VERSION)-$(RPM_REV).src.rpm : dist $(distdir).tar.gz $(PACKAGE).spec @arch=`arch` ; case $$arch in \ i?86) ;; \ ppc) ;; \ *) echo >&2 "Architecture $$arch not yet supported"; exit 1;; \ esac @-case "$(LDFLAGS)" in \ *-all-static*) ;; \ *) echo >&2 "WARNING: LDFLAGS=-all-static required for portability"; \ sleep 5;; \ esac @-uid=`id -u` ; case $$uid in \ 0) ;; \ *) echo >&2 "WARNING: Build as root to avoid install-time warnings"; \ sleep 5;; \ esac @-rm -rf rpmrc BUILD RPMS SOURCES SPECS SRPMS mkdir BUILD RPMS SOURCES SPECS SRPMS mkdir RPMS/alpha RPMS/i386 RPMS/i686 RPMS/ppc RPMS/sparc ln $(distdir).tar.gz SOURCES/$(distdir).tar.gz echo "topdir: `pwd`" > rpmrc echo "`grep '^macrofiles:' /usr/lib/rpm/rpmrc`:`pwd`/rpm-macros" \ >> rpmrc echo "%_topdir `pwd`" > rpm-macros rpm -ba --rcfile rpmrc --clean $(PACKAGE).spec mv SRPMS/*.rpm . -mv RPMS/*/*.rpm . rm -rf rpmrc BUILD RPMS SOURCES SPECS SRPMS # A shorthand rule -- it's easier to type "make @PACKAGE@-rpm". # This rule also assures that $(PACKAGE).spec is rebuilt. $(PACKAGE)-rpm: @-rm -f $(PACKAGE).spec $(MAKE) $(PACKAGE)-$(VERSION)-$(RPM_REV).src.rpm