SUBDIRS = lib
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
CONFIG_HEADERS = config.h:config.hin
-DIST_COMMON = ChangeLog COPYING README Makefile.in aclocal.m4 config.hin \
+DIST_COMMON = Changes COPYING README Makefile.in aclocal.m4 config.hin \
configure configure.in conftools doc examples xmlwf
DISTDIR = $(PACKAGE)-$(VERSION)
@list='$(SUBDIRS)'; for dir in $$list; do \
cd $$dir; $(MAKE) distclean; cd ..; \
done
- rm -f config.h config.status libtool
+ rm -f config.h config.status config.log libtool examples/Makefile xmlwf/Makefile
maintainer-clean: distclean
rm -f $(DISTRIBUTION)
rm -rf $(DISTDIR)
-distdir: $(DIST_COMMON) clean
- test -d $(DISTDIR) || mkdir $(DISTDIR)
- @list='$(SUBDIRS)'; for dir in $$list; do \
- test -d $(DISTDIR)/$$dir || mkdir $(DISTDIR)/$$dir; \
- cd $$dir; $(MAKE) distdir; cd ..; \
+distdir: MANIFEST
+ test -d $(DISTDIR) && rm -rf $(DISTDIR); \
+ mkdir $(DISTDIR); \
+ flist=`sed -e "s/[ ]:.*$$//" MANIFEST`; for file in $$flist; do \
+ cp -P $$file $(DISTDIR); \
done
- @for file in $(DIST_COMMON); do \
- if test -d $$file; then \
- cp -prf $$file $(DISTDIR)/$$file; \
- else \
- test -f $(DISTDIR)/$$file \
- || ln $$file $(DISTDIR)/$$file 2> /dev/null \
- || cp -p $$file $(DISTDIR)/$$file || :; \
- fi; \
- done
$(DISTRIBUTION): distdir
tar cfz $(DISTRIBUTION) $(DISTDIR)
# we shouldn't force the makefile maintainer to figure out
# which system we are compiling for in order to pass an extra
# flag for every libtool invokation.
- # allow_undefined=no
+ allow_undefined=no
# FIXME: Unfortunately, there are problems with the above when trying
# to make a dll which has undefined symbols, in which case not
# even a static library is built. For now, we need to specify
# -no-undefined on the libtool link line when we can be certain
# that all symbols are satisfied, otherwise we get a static library.
- allow_undefined=yes
+ # allow_undefined=yes
# This is a source program that is used to create dlls on Windows
# Don't remove nor modify the starting and closing comments
# # endif
# #endif
#
-# #ifdef __cplusplus
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #else
+# # ifdef __cplusplus
# extern "C" {
-# #endif
+# # endif
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
+# # ifdef __cplusplus
# }
-# #endif
+# # endif
#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
# HINSTANCE __hDllInstance_base;
#
# BOOL APIENTRY
# __hDllInstance_base = hInst;
# return TRUE;
# }
+# #endif
# /* ltdll.c ends here */
# This is a source program that is used to create import libraries
# on Windows for dlls which lack them. Don't remove nor modify the
all: $(LIBRARY)
.SUFFIXES: .c .lo .o
-.PHONY: all clean distclean maintainer-clean distdir
+.PHONY: all clean distclean maintainer-clean
%.o: %.c
@echo '$(COMPILE) -c $<'; \
rm -rf .libs _libs .deps
distclean: clean
+ rm -f Makefile
maintainer-clean: distclean
$(LIBRARY): $(LTOBJECTS)
$(LINK) -rpath $(libdir) $(LDFLAGS) $(LTOBJECTS)
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-distdir: $(DISTFILES)
- @here=`cd $(top_builddir) && pwd`; \
- top_distdir=`cd $(top_distdir) && pwd`; \
- distdir=`cd $(distdir) && pwd`; \
- for file in $(DISTFILES); do \
- d=$(srcdir); \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-
xmlparse.o \
xmlparse.lo: xmlparse.c expat.h xmlrole.h xmltok.h $(top_builddir)/config.h
xmlrole.o \
-xmlrole.lo: xmlrole.c ascii.h xmldef.h xmlrole.h $(top_builddir)/config.h
+xmlrole.lo: xmlrole.c ascii.h xmlrole.h $(top_builddir)/config.h
xmltok.o \
xmltok.lo: xmltok.c xmltok_impl.c xmltok_ns.c \
ascii.h asciitab.h iasciitab.h latin1tab.h nametab.h utf8tab.h \
- xmldef.h xmltok.h xmltok_impl.h $(top_builddir)/config.h
+ xmltok.h xmltok_impl.h $(top_builddir)/config.h
}
static
-void metaStartDoctypeDecl(XML_Parser parser, const XML_Char *doctypeName)
+void metaStartDoctypeDecl(XML_Parser parser,
+ const XML_Char *doctypeName,
+ const XML_Char *sysid,
+ const XML_Char *pubid,
+ int has_internal_subset)
{
FILE *fp = XML_GetUserData(parser);
ftprintf(fp, T("<startdoctype name=\"%s\""), doctypeName);
fputts(T("/>\n"), fp);
}
-static
-void metaUnparsedEntityDecl(XML_Parser parser,
- const XML_Char *entityName,
- const XML_Char *base,
- const XML_Char *systemId,
- const XML_Char *publicId,
- const XML_Char *notationName)
-{
- FILE *fp = XML_GetUserData(parser);
- ftprintf(fp, T("<entity name=\"%s\""), entityName);
- if (publicId)
- ftprintf(fp, T(" public=\"%s\""), publicId);
- fputts(T(" system=\""), fp);
- characterData(fp, systemId, tcslen(systemId));
- puttc(T('"'), fp);
- ftprintf(fp, T(" notation=\"%s\""), notationName);
- metaLocation(parser);
- fputts(T("/>\n"), fp);
-}
-
static
void metaNotationDecl(XML_Parser parser,
const XML_Char *notationName,
static
-void metaExternalParsedEntityDecl(XML_Parser parser,
- const XML_Char *entityName,
- const XML_Char *base,
- const XML_Char *systemId,
- const XML_Char *publicId)
+void metaEntityDecl(XML_Parser parser,
+ const XML_Char *entityName,
+ int is_param,
+ const XML_Char *value,
+ int value_length,
+ const XML_Char *base,
+ const XML_Char *systemId,
+ const XML_Char *publicId,
+ const XML_Char *notationName)
{
FILE *fp = XML_GetUserData(parser);
- ftprintf(fp, T("<entity name=\"%s\""), entityName);
- if (publicId)
- ftprintf(fp, T(" public=\"%s\""), publicId);
- fputts(T(" system=\""), fp);
- characterData(fp, systemId, tcslen(systemId));
- puttc(T('"'), fp);
- metaLocation(parser);
- fputts(T("/>\n"), fp);
-}
-static
-void metaInternalParsedEntityDecl(XML_Parser parser,
- const XML_Char *entityName,
- const XML_Char *text,
- int textLen)
-{
- FILE *fp = XML_GetUserData(parser);
- ftprintf(fp, T("<entity name=\"%s\""), entityName);
- metaLocation(parser);
- puttc(T('>'), fp);
- characterData(fp, text, textLen);
- fputts(T("</entity/>\n"), fp);
+ if (value) {
+ ftprintf(fp, T("<entity name=\"%s\""), entityName);
+ metaLocation(parser);
+ puttc(T('>'), fp);
+ characterData(fp, value, value_length);
+ fputts(T("</entity/>\n"), fp);
+ }
+ else if (notationName) {
+ ftprintf(fp, T("<entity name=\"%s\""), entityName);
+ if (publicId)
+ ftprintf(fp, T(" public=\"%s\""), publicId);
+ fputts(T(" system=\""), fp);
+ characterData(fp, systemId, tcslen(systemId));
+ puttc(T('"'), fp);
+ ftprintf(fp, T(" notation=\"%s\""), notationName);
+ metaLocation(parser);
+ fputts(T("/>\n"), fp);
+ }
+ else {
+ ftprintf(fp, T("<entity name=\"%s\""), entityName);
+ if (publicId)
+ ftprintf(fp, T(" public=\"%s\""), publicId);
+ fputts(T(" system=\""), fp);
+ characterData(fp, systemId, tcslen(systemId));
+ puttc(T('"'), fp);
+ metaLocation(parser);
+ fputts(T("/>\n"), fp);
+ }
}
static
XML_SetCdataSectionHandler(parser, metaStartCdataSection, metaEndCdataSection);
XML_SetCharacterDataHandler(parser, metaCharacterData);
XML_SetDoctypeDeclHandler(parser, metaStartDoctypeDecl, metaEndDoctypeDecl);
- XML_SetUnparsedEntityDeclHandler(parser, metaUnparsedEntityDecl);
+ XML_SetEntityDeclHandler(parser, metaEntityDecl);
XML_SetNotationDeclHandler(parser, metaNotationDecl);
- XML_SetExternalParsedEntityDeclHandler(parser, metaExternalParsedEntityDecl);
- XML_SetInternalParsedEntityDeclHandler(parser, metaInternalParsedEntityDecl);
XML_SetNamespaceDeclHandler(parser, metaStartNamespaceDecl, metaEndNamespaceDecl);
metaStartDocument(parser);
break;