[Expat-checkins] CVS: expat Makefile.in,1.20,1.21 buildconf.sh,1.4,1.5 configure.in,1.25,1.26

Greg Stein gstein@users.sourceforge.net
Fri Dec 7 02:20:02 2001


Update of /cvsroot/expat/expat
In directory usw-pr-cvs1:/tmp/cvs-serv14868

Modified Files:
	Makefile.in buildconf.sh configure.in 
Log Message:
* Switch to a single, top-level Makefile (simplification, consistency)
* use libtool to compile/link all programs
* remove */Makefile.in and remove them from configure
* remove autom4te.cache after running autoconf
* remove .o from the FILEMAP logic in configure and the Make system;
  provides more flexibility in the Makefile to use it
* for VPATH builds: create the build subdirs by running
  "make mkdir-init" from the configure script
* adjust .cvsignore files to account for presence of .libs now



Index: Makefile.in
===================================================================
RCS file: /cvsroot/expat/expat/Makefile.in,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** Makefile.in	2001/10/02 16:40:17	1.20
--- Makefile.in	2001/12/07 10:19:30	1.21
***************
*** 34,37 ****
--- 34,38 ----
  top_srcdir = @top_srcdir@
  VPATH = @srcdir@
+ 
  prefix = @prefix@
  exec_prefix = @exec_prefix@
***************
*** 49,81 ****
  mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs
  
- CC = @CC@
- 
- LIBTOOL = @LIBTOOL@
- 
- SUBDIRS = lib examples xmlwf
- CONFIG_HEADERS = config.h
- 
  APIHEADER = expat.h
  LIBRARY = libexpat.la
  
- 
- default:  lib xmlwf
  
! buildlib: lib
  
! all: $(SUBDIRS)
  
! $(SUBDIRS)::
! 	cd $@ && $(MAKE)
  
  clean:
  	cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs
! 	cd xmlwf && rm -f xmlwf *.o
! 	cd examples && rm -f elements outline *.o
  	find . -name core | xargs rm -f
  
  distclean: clean
  	rm -f config.h config.status config.log config.cache libtool
! 	rm -f Makefile lib/Makefile examples/Makefile xmlwf/Makefile tests/Makefile
  
  extraclean: distclean
--- 50,72 ----
  mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs
  
  APIHEADER = expat.h
  LIBRARY = libexpat.la
  
  
! default:  buildlib xmlwf/xmlwf
  
! buildlib: lib/$(LIBRARY)
  
! all: lib/$(LIBRARY) xmlwf/xmlwf examples/elements examples/outline
  
  clean:
  	cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs
! 	cd xmlwf && rm -f xmlwf *.o *.lo && rm -rf .libs _libs
! 	cd examples && rm -f elements outline *.o *.lo && rm -rf .libs _libs
  	find . -name core | xargs rm -f
  
  distclean: clean
  	rm -f config.h config.status config.log config.cache libtool
! 	rm -f Makefile
  
  extraclean: distclean
***************
*** 84,89 ****
  	rm -f conftools/ltconfig conftools/ltmain.sh
  
! check:	$(SUBDIRS)
! 	cd tests && $(MAKE) check
  
  install: xmlwf/xmlwf lib/$(LIBRARY) lib/$(APIHEADER)
--- 75,80 ----
  	rm -f conftools/ltconfig conftools/ltmain.sh
  
! check: tests/runtests
! 	@cd tests && ./runtests
  
  install: xmlwf/xmlwf lib/$(LIBRARY) lib/$(APIHEADER)
***************
*** 98,102 ****
  	rm -f $(libdir)/$(APIHEADER)
  
! .PHONY: buildlib all $(SUBDIRS) \
  	clean distclean extraclean maintainer-clean \
  	dist distdir \
--- 89,159 ----
  	rm -f $(libdir)/$(APIHEADER)
  
! # for VPATH builds (invoked by configure)
! mkdir-init:
! 	@for d in lib xmlwf examples tests ; do \
! 		(mkdir $$d 2> /dev/null || test 1) ; \
! 	done
! 
! CC = @CC@
! LIBTOOL = @LIBTOOL@
! 
! INCLUDES = -Ilib -I.
! LDFLAGS = @LDFLAGS@
! CPPFLAGS = @CPPFLAGS@
! CFLAGS = @CFLAGS@
! VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@
! 
! ### autoconf this?
! LTFLAGS = --silent
! 
! COMPILE = $(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) $(INCLUDES)
! LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE)
! LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@
! LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@
! 
! LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo
! lib/$(LIBRARY): $(LIB_OBJS)
! 	$(LINK_LIB) $(LIB_OBJS)
! 
! lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \
! 	$(top_builddir)/config.h
! 
! lib/xmlrole.lo: lib/xmlrole.c lib/ascii.h lib/xmlrole.h \
! 	$(top_builddir)/config.h
! 
! lib/xmltok.lo: lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c \
! 	lib/ascii.h lib/asciitab.h lib/iasciitab.h lib/latin1tab.h \
! 	lib/nametab.h lib/utf8tab.h lib/xmltok.h lib/xmltok_impl.h \
! 	$(top_builddir)/config.h
! 
! 
! XMLWF_OBJS = xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/@FILEMAP@.o
! xmlwf/xmlwf.o: xmlwf/xmlwf.c
! xmlwf/xmlfile.o: xmlwf/xmlfile.c
! xmlwf/codepage.o: xmlwf/codepage.c
! xmlwf/@FILEMAP@.o: xmlwf/@FILEMAP@.c
! xmlwf/xmlwf: $(XMLWF_OBJS)
! 	$(LINK_EXE) $(XMLWF_OBJS) lib/$(LIBRARY)
! 
! examples/elements.o: examples/elements.c
! examples/elements: examples/elements.o
! 	$(LINK_EXE) $< lib/$(LIBRARY)
! 
! examples/outline.o: examples/outline.c
! examples/outline: examples/outline.o
! 	$(LINK_EXE) $< lib/$(LIBRARY)
! 
! tests/runtests.o: tests/runtests.c
! tests/runtests: tests/runtests.o
! 	$(LINK_EXE) $< lib/$(LIBRARY)
! 
! .SUFFIXES: .c .lo .o
! 
! .c.o:
! 	$(COMPILE) -o $@ -c $<
! .c.lo:
! 	$(LTCOMPILE) -o $@ -c $<
! 
! .PHONY: buildlib all \
  	clean distclean extraclean maintainer-clean \
  	dist distdir \

Index: buildconf.sh
===================================================================
RCS file: /cvsroot/expat/expat/buildconf.sh,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** buildconf.sh	2001/11/09 04:07:43	1.4
--- buildconf.sh	2001/12/07 10:19:30	1.5
***************
*** 42,45 ****
--- 42,48 ----
  autoconf
  
+ # toss this; it gets created by autoconf on some systems
+ rm -rf autom4te.cache
+ 
  # exit with the right value, so any calling script can continue
  exit 0

Index: configure.in
===================================================================
RCS file: /cvsroot/expat/expat/configure.in,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** configure.in	2001/11/09 04:19:01	1.25
--- configure.in	2001/12/07 10:19:30	1.26
***************
*** 80,105 ****
  
  if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then
!     FILEMAP_OBJ=unixfilemap.o
  else
!     FILEMAP_OBJ=readfilemap.o
  fi
! AC_SUBST(FILEMAP_OBJ)
  
  AC_CHECK_FUNCS(memmove bcopy)
  
! dnl Generate makefiles only for the directories that are present;
! dnl this allows this (and the generated configure script) to work
! dnl in "embedded distributions", where only part of the Expat sources
! dnl are included in the sources for another project.
  
! OUTPUT="Makefile lib/Makefile"
! if test -d ${srcdir}/xmlwf; then
!     OUTPUT="$OUTPUT xmlwf/Makefile"
! fi
! if test -d ${srcdir}/examples; then
!     OUTPUT="$OUTPUT examples/Makefile"
! fi
! if test -d ${srcdir}/tests; then
!     OUTPUT="$OUTPUT tests/Makefile"
  fi
- AC_OUTPUT($OUTPUT)
--- 80,96 ----
  
  if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then
!     FILEMAP=unixfilemap
  else
!     FILEMAP=readfilemap
  fi
! AC_SUBST(FILEMAP)
  
  AC_CHECK_FUNCS(memmove bcopy)
  
! AC_OUTPUT(Makefile)
  
! abs_srcdir="`cd $srcdir && pwd`"
! abs_builddir="`pwd`"
! if test "$abs_srcdir" != "$abs_builddir"; then
!   make mkdir-init
  fi