############################################################################# # # Copyright 1998, 1999 Brown University and Richard Goerwitz # # Please see the INSTALL file for instructions on how to install and # configure Xmlparse. DO NOT ATTEMPT TO EDIT Makefile.in! First run # the ./configure script, then edit Makefile. You will doubtless # have to change a few things in the "user variables" section. # ############################################################################# # # This variable may be overridden via the environment variable, # SGML_CATALOG_FILE, or via the configuration file. See the sample # xmlparse.cfg file (built as part of the xmlparse configuration # process). This is a colon-separated file path list. # DEFAULT_SGML_CATALOG_FILES = /usr/local/lib/sgml/CATALOG ### System configuration section ############################################ # Don't change this unless you are Goerwitz. If you are Goerwitz, # and you change it, then remember to remove the build_level file. # VERSION_NUMBER = 0.9 srcdir = @srcdir@ VPATH = @srcdir@ CC = @CC@ -Wall # CHECKFLAGS = -g -Wall # DEBUG_CC = checkergcc # CC = $(DEBUG_CC) $(CHECKFLAGS) CPPFLAGS = @CPPFLAGS@ CFLAGS = @CFLAGS@ $(CPPFLAGS) LIBS = @LIBS@ -lxmlp LN_S = @LN_S@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ LDFLAGS = @LDFLAGS@ -L@srcdir@ # LDFLAGS = @LDFLAGS@ -s -L@srcdir@ YACC = @YACC@ RANLIB = @RANLIB@ # Unicode-patched Flex is required (see the INSTALL file) LEX = flex prefix = @prefix@ exec_prefix = @exec_prefix@ # Directory in which to install executable. bindir = $(exec_prefix)/bin libdir = $(prefix)/lib # Manual pages manext = 1 mandir = $(prefix)/man/man$(manext) # Location of the default xmlparse directory DEFAULT_XMLPARSE_LIBDIR = $(libdir)/xmlparse DEFAULT_MESSAGE_FILENAME = messages DEFAULT_CONFIG_FILENAME = xmlparse.cfg DEFAULT_URL_RESOLUTION_CMD_STRING = $(bindir)/get_uri '%s' '%s' # Tell program about configuration file DEFS = @DEFS@ \ -DDEFAULT_XMLPARSE_LIBDIR=\"$(DEFAULT_XMLPARSE_LIBDIR)\" \ -DDEFAULT_CONFIG_FILENAME=\"$(DEFAULT_CONFIG_FILENAME)\" \ -DDEFAULT_MESSAGE_FILENAME=\"$(DEFAULT_MESSAGE_FILENAME)\" \ -DDEFAULT_SGML_CATALOG_FILES=\"$(DEFAULT_SGML_CATALOG_FILES)\" \ -DDEFAULT_URL_RESOLUTION_CMD_STRING="\"$(DEFAULT_URL_RESOLUTION_CMD_STRING)\"" \ # Delete this line and uncomment next to nix debugging # -DXML_NODEBUG ### Source, object file, etc. variables ##################################### SRC = xmlparse.c bidipipe.c dtdutil.c errabort.c fileutil.c getmessage.c \ grammutil.c hashutil.c langcode.c lexutil.l lockutil.c namespace.c \ nfadfa.c parstree.c parsutil.y readcfg.c sigstuff.c strutil.c xml2utf.c \ utfutil.c xml_mktemp.c xtrautil.c C_SRC = xmlparse.c bidipipe.c dtdutil.c errabort.c fileutil.c getmessage.c \ grammutil.c hashutil.c langcode.c lexutil.c lockutil.c namespace.c \ nfadfa.c parstree.c parsutil.c readcfg.c sigstuff.c strutil.c xml2utf.c \ utfutil.c xml_mktemp.c xtrautil.c LIBOBJ = bidipipe.o dtdutil.o errabort.o fileutil.o getmessage.o grammutil.o \ hashutil.o langcode.o lockutil.o namespace.o nfadfa.o parstree.o parsutil.o \ readcfg.o sigstuff.o strutil.o utfutil.o xtrautil.o HDRS = general.h bidipipe.h dtdutil.h errabort.h fileutil.h getmessage.h \ grammutil.h hashutil.h langcode.h lockutil.h namespace.h nfadfa.h \ parstree.h parsutil.h readcfg.h sigstuff.h strutil.h utfutil.h xtrautil.h \ version.h isotabs.h sjistabs.h DISTFILES = $(SRC) $(HDRS) xmlparse.man configure README INSTALL \ COPYRIGHT TO-DO config.h.in mkinstalldirs install-sh xmlparse.cfg.in \ messages iso2uni.awk jis2uni.pl get_uri.in xmlvalid.shtml FAQ.shtml \ xmlvalid.pl.in xmlvalid.de.shtml ### Basic .c.o rule ######################################################### %.o: %.c $(CC) -c $(DEFS) $(CFLAGS) -o $@ $< ############################################################################# .PRECIOUS: parsutil.c lexutil.c configure all: isotabs.h version.h libxmlp.a xmlparse xml_mktemp xml2utf libxmlp.a: $(LIBOBJ) ar cr $@ $? $(RANLIB) $@ xmlparse: xmlparse.o libxmlp.a $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ xml2utf: xml2utf.o libxmlp.a $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ parsutil.c: parsutil.y lexutil.c $(YACC) -pxml_yy $< && \ awk '/fprintf *\( *stderr.*, *$$/ { printf "%s", $$0; next } {print $$0 }' < y.tab.c | \ sed 's,fprintf *( *stderr\(.*\));,xwrap (errdebug (5\1));,g' > $@; \ rm -f y.tab.c fileutil.o: isotabs.h fileutil.h fileutil.c lexutil.c: lexutil.l $(LEX) -U -Ce -Pxml_yy -t $< > $@ ### Pseudo ################################################################## .PHONY: install installdirs mostlyclean clean distclean \ realclean maintainer-clean install: all installdirs $(INSTALL_PROGRAM) xmlparse $(bindir) $(INSTALL_PROGRAM) get_uri $(bindir) $(INSTALL_PROGRAM) xml2utf $(bindir) if test "@MKTEMP@" = "xml_mktemp"; then \ $(INSTALL_PROGRAM) xml_mktemp $(bindir); \ fi $(INSTALL_DATA) xmlparse.man $(mandir)/xmlparse.$(manext) $(INSTALL_DATA) $(DEFAULT_CONFIG_FILENAME) $(DEFAULT_XMLPARSE_LIBDIR) $(INSTALL_DATA) $(DEFAULT_MESSAGE_FILENAME) $(DEFAULT_XMLPARSE_LIBDIR) cd $(DEFAULT_XMLPARSE_LIBDIR); \ for i in C en en-US; do \ rm -f $(DEFAULT_MESSAGE_FILENAME).$$i; \ $(LN_S) $(DEFAULT_MESSAGE_FILENAME) $(DEFAULT_MESSAGE_FILENAME).$$i; \ done chmod go-w $(DEFAULT_XMLPARSE_LIBDIR) installdirs: $(srcdir)/mkinstalldirs $(bindir) $(mandir) $(DEFAULT_XMLPARSE_LIBDIR) mostlyclean: rm -f *~ test-* y.output y.tab.c lex.yy.c core rm -f a.out y.out *.bak scan.tmp #*# clean: mostlyclean rm -f xmlparse *.o *.d distclean realclean: clean rm -f parsutil.c lexutil.c xmlparse.cfg get_uri config.status \ config.h config.cache Makefile maintainer-clean: distclean @echo "This command is for maintainers only, as it deletes files" @echo "that may require special tools to rebuild. Hit ^C at once" @echo "if this isn't what you had in mind!" @sleep 5 rm -f config.h.in xmlparse*.tar.gz xmlparse*.tgz ### End ##################################################################### xmlparse.o: xmlparse.c general.h config.h getmessage.h hashutil.h \ fileutil.h parstree.h nfadfa.h utfutil.h dtdutil.h errabort.h \ parsutil.h readcfg.h sigstuff.h strutil.h version.h bidipipe.o: bidipipe.c bidipipe.h general.h config.h getmessage.h \ hashutil.h fileutil.h parstree.h nfadfa.h utfutil.h sigstuff.h dtdutil.o: dtdutil.c dtdutil.h general.h config.h getmessage.h \ hashutil.h fileutil.h parstree.h nfadfa.h utfutil.h bidipipe.h \ errabort.h lockutil.h sigstuff.h strutil.h xtrautil.h \ /usr/include/setjmp.h errabort.o: errabort.c general.h config.h getmessage.h hashutil.h \ fileutil.h parstree.h nfadfa.h utfutil.h errabort.h fileutil.o: fileutil.c fileutil.h general.h config.h getmessage.h \ hashutil.h parstree.h nfadfa.h utfutil.h isotabs.h errabort.h \ grammutil.h lockutil.h parsutil.h sjistabs.h strutil.h xtrautil.h getmessage.o: getmessage.c getmessage.h hashutil.h general.h config.h \ fileutil.h parstree.h nfadfa.h utfutil.h errabort.h lockutil.h \ strutil.h grammutil.o: grammutil.c grammutil.h general.h config.h getmessage.h \ hashutil.h fileutil.h parstree.h nfadfa.h utfutil.h errabort.h \ langcode.h namespace.h parsutil.h xtrautil.h hashutil.o: hashutil.c hashutil.h general.h config.h getmessage.h \ fileutil.h parstree.h nfadfa.h utfutil.h errabort.h langcode.o: langcode.c langcode.h general.h config.h getmessage.h \ hashutil.h fileutil.h parstree.h nfadfa.h utfutil.h lockutil.o: lockutil.c general.h config.h getmessage.h hashutil.h \ fileutil.h parstree.h nfadfa.h utfutil.h lockutil.h errabort.h namespace.o: namespace.c namespace.h general.h config.h getmessage.h \ hashutil.h fileutil.h parstree.h nfadfa.h utfutil.h errabort.h \ xtrautil.h nfadfa.o: nfadfa.c nfadfa.h general.h config.h getmessage.h hashutil.h \ fileutil.h parstree.h utfutil.h errabort.h parstree.o: parstree.c parstree.h general.h config.h getmessage.h \ hashutil.h fileutil.h utfutil.h nfadfa.h errabort.h grammutil.h \ namespace.h readcfg.o: readcfg.c general.h config.h getmessage.h hashutil.h \ fileutil.h parstree.h nfadfa.h utfutil.h readcfg.h dtdutil.h \ errabort.h lockutil.h strutil.h /usr/include/locale.h sigstuff.o: sigstuff.c sigstuff.h general.h config.h getmessage.h \ hashutil.h fileutil.h parstree.h nfadfa.h utfutil.h errabort.h strutil.o: strutil.c strutil.h general.h config.h getmessage.h \ hashutil.h fileutil.h parstree.h nfadfa.h utfutil.h xml2utf.o: xml2utf.c general.h config.h getmessage.h hashutil.h \ fileutil.h parstree.h nfadfa.h utfutil.h errabort.h readcfg.h utfutil.o: utfutil.c utfutil.h general.h config.h getmessage.h \ hashutil.h fileutil.h parstree.h nfadfa.h errabort.h xml_mktemp.o: xml_mktemp.c general.h config.h getmessage.h hashutil.h \ fileutil.h parstree.h nfadfa.h utfutil.h xtrautil.o: xtrautil.c general.h config.h getmessage.h hashutil.h \ fileutil.h parstree.h nfadfa.h utfutil.h xtrautil.h errabort.h