]> granicus.if.org Git - libexpat/commitdiff
Switch to using MANIFEST to build distribution.
authorClark Cooper <coopercc@users.sourceforge.net>
Thu, 28 Sep 2000 19:47:35 +0000 (19:47 +0000)
committerClark Cooper <coopercc@users.sourceforge.net>
Thu, 28 Sep 2000 19:47:35 +0000 (19:47 +0000)
Also fix xmlwf to use current entity declaration signature.

expat/Changes [moved from expat/ChangeLog with 100% similarity]
expat/Makefile.in
expat/conftools/ltmain.sh
expat/lib/Makefile.in
expat/xmlwf/Makefile.in
expat/xmlwf/xmlwf.c

similarity index 100%
rename from expat/ChangeLog
rename to expat/Changes
index 24db2bd7aa34969965cd6bf0957d47d6f88e1c0b..7befd0eb55726b48a84767fc16cad07ae0e77b22 100644 (file)
@@ -79,7 +79,7 @@ VERSION = @VERSION@
 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)
@@ -121,27 +121,18 @@ distclean:
        @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)      
index 766732da8440bd83b7558219a1efd41567c6fa8d..edfd1815960b92d3a57482bf2841d7a4af57af46 100644 (file)
@@ -627,14 +627,14 @@ compiler."
       # 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
@@ -650,18 +650,18 @@ compiler."
 # #  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
@@ -670,6 +670,7 @@ compiler."
 #   __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
index b9b4252e601b665ff425d68484804bf5d440517a..369bbdc2415017ca59c5c7b034737099c1cdd01a 100644 (file)
@@ -105,7 +105,7 @@ GZIP_ENV = --best
 all: $(LIBRARY)
 
 .SUFFIXES: .c .lo .o
-.PHONY: all clean distclean maintainer-clean distdir
+.PHONY: all clean distclean maintainer-clean
 
 %.o: %.c
        @echo '$(COMPILE) -c $<'; \
@@ -142,6 +142,7 @@ clean:
        rm -rf .libs _libs .deps
 
 distclean: clean
+       rm -f Makefile
 
 maintainer-clean: distclean
 
@@ -157,30 +158,13 @@ uninstall:
 $(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
index 21ccdf9a2251ffff0eaa56bfd8f2fe33a9a7029f..c17ea289c09cfb79ce9a2097bafe1e72cf01d36a 100644 (file)
@@ -9,4 +9,7 @@ OBJS= xmlwf.o xmlfile.o codepage.o $(FILEMAP_OBJ)
 LIBS= -L$(LIBDIR) -lexpat
 
 xmlwf: $(OBJS)
-       $(CC) -o xmlwf $(LDFLAGS) $(OBJS) $(LIBS)@
+       $(CC) -o xmlwf $(LDFLAGS) $(OBJS) $(LIBS)
+
+clean:
+       rm -f xmlwf core *.o@
index a69e36e9ecb6bed90043ed9e1a051d96de906580..891c0db5f3d80ab2e67599b0effb3e431969cb11 100755 (executable)
@@ -397,7 +397,11 @@ void metaCharacterData(XML_Parser parser, const XML_Char *s, int len)
 }
 
 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);
@@ -414,26 +418,6 @@ void metaEndDoctypeDecl(XML_Parser parser)
   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,
@@ -456,35 +440,46 @@ void metaNotationDecl(XML_Parser parser,
 
 
 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
@@ -723,10 +718,8 @@ int tmain(int argc, XML_Char **argv)
        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;