mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-24 11:25:30 +00:00
Fix cross-compilation so that we don't run locally-built targets when cross-
compiling.
This commit is contained in:
parent
2b94fdd0dd
commit
150195f8e1
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,7 +5,6 @@ config.h
|
||||
config.log
|
||||
config.status
|
||||
doc/mxml.d
|
||||
doc/mxml.man
|
||||
libmxml.1.dylib
|
||||
libmxml.a
|
||||
libmxml.dylib
|
||||
@ -14,7 +13,6 @@ libmxml.sl.1
|
||||
libmxml.so
|
||||
libmxml.so.1
|
||||
libmxml.so.1.5
|
||||
mxml.list
|
||||
mxml.pc
|
||||
mxml.xml
|
||||
mxmldoc
|
||||
|
65
Makefile.in
65
Makefile.in
@ -78,22 +78,21 @@ INSTALL_SCRIPT = $(INSTALL) -m 755
|
||||
# Targets...
|
||||
#
|
||||
|
||||
DOCFILES = doc/0.gif doc/1.gif doc/2.gif doc/3.gif doc/4.gif \
|
||||
doc/A.gif doc/B.gif doc/C.gif doc/D.gif \
|
||||
doc/mxml.html doc/mxmldoc.xsd \
|
||||
README COPYING CHANGES
|
||||
DOCFILES = doc/mxml.html doc/mxmldoc.xsd README.md COPYING CHANGES.md
|
||||
PUBLIBOBJS = mxml-attr.o mxml-entity.o mxml-file.o mxml-get.o \
|
||||
mxml-index.o mxml-node.o mxml-search.o mxml-set.o
|
||||
LIBOBJS = $(PUBLIBOBJS) mxml-private.o mxml-string.o
|
||||
OBJS = mxmldoc.o testmxml.o $(LIBOBJS)
|
||||
TARGETS = $(LIBMXML) mxmldoc testmxml mxml.xml doc/mxml.man
|
||||
ALLTARGETS = $(LIBMXML) mxmldoc testmxml mxml.xml
|
||||
CROSSTARGETS = $(LIBMXML) mxmldoc
|
||||
TARGETS = $(@TARGETS@)
|
||||
|
||||
|
||||
#
|
||||
# Make everything...
|
||||
#
|
||||
|
||||
all: Makefile config.h $(TARGETS)
|
||||
all: $(TARGETS)
|
||||
|
||||
|
||||
#
|
||||
@ -144,7 +143,7 @@ install: $(TARGETS) install-$(LIBMXML) install-libmxml.a
|
||||
echo Installing documentation in $(BUILDROOT)$(docdir)...
|
||||
$(INSTALL_DIR) $(BUILDROOT)$(docdir)
|
||||
for file in $(DOCFILES); do \
|
||||
$(INSTALL_MAN) $$file $(BUILDROOT)$(docdir); \
|
||||
$(INSTALL_MAN) $$file $(BUILDROOT)$(docdir)/`basename $$file .md`; \
|
||||
done
|
||||
echo Installing header files in $(BUILDROOT)$(includedir)...
|
||||
$(INSTALL_DIR) $(BUILDROOT)$(includedir)
|
||||
@ -226,43 +225,6 @@ uninstall-libmxml.1.dylib:
|
||||
$(RM) $(BUILDROOT)$(libdir)/libmxml.1.dylib
|
||||
|
||||
|
||||
#
|
||||
# Make packages using EPM (http://www.epmhome.org/)
|
||||
#
|
||||
|
||||
epm: all
|
||||
echo Creating distribution packages...
|
||||
epm --output-dir dist -v -f native mxml
|
||||
epm --output-dir dist -v -f portable mxml
|
||||
|
||||
|
||||
#
|
||||
# autoconf stuff...
|
||||
#
|
||||
|
||||
Makefile: configure Makefile.in
|
||||
echo Updating makefile...
|
||||
if test -f config.status; then \
|
||||
./config.status --recheck; \
|
||||
./config.status; \
|
||||
else \
|
||||
./configure; \
|
||||
fi
|
||||
touch config.h
|
||||
|
||||
|
||||
config.h: configure config.h.in
|
||||
echo Updating config.h...
|
||||
autoconf
|
||||
if test -f config.status; then \
|
||||
./config.status --recheck; \
|
||||
./config.status; \
|
||||
else \
|
||||
./configure; \
|
||||
fi
|
||||
touch config.h
|
||||
|
||||
|
||||
#
|
||||
# Figure out lines-of-code...
|
||||
#
|
||||
@ -386,6 +348,9 @@ mxml.xml: mxmldoc-static mxml.h $(PUBLIBOBJS:.o=.c)
|
||||
echo Generating API documentation...
|
||||
$(RM) mxml.xml
|
||||
./mxmldoc-static --header doc/reference.heading mxml.xml mxml.h $(PUBLIBOBJS:.o=.c) >doc/reference.html
|
||||
./mxmldoc-static --man mxml --title "Mini-XML API" \
|
||||
--intro doc/intro.man --footer doc/footer.man \
|
||||
mxml.xml >doc/mxml.man
|
||||
if test "x`uname`" = xDarwin; then \
|
||||
./mxmldoc-static --docset org.minixml.docset \
|
||||
--docversion @VERSION@ --feedname minixml.org \
|
||||
@ -408,18 +373,6 @@ valgrind: mxmldoc-static
|
||||
>valgrind.html 2>valgrind.out
|
||||
|
||||
|
||||
#
|
||||
# doc/mxml.man
|
||||
#
|
||||
|
||||
doc/mxml.man: mxmldoc-static mxml.xml
|
||||
echo "Generating mxml(3) man page..."
|
||||
$(RM) doc/mxml.man
|
||||
./mxmldoc-static --man mxml --title "Mini-XML API" \
|
||||
--intro doc/intro.man --footer doc/footer.man \
|
||||
mxml.xml >doc/mxml.man
|
||||
|
||||
|
||||
#
|
||||
# All object files depend on the makefile...
|
||||
#
|
||||
|
8
configure
vendored
8
configure
vendored
@ -625,6 +625,7 @@ ac_subst_vars='LTLIBOBJS
|
||||
LIBOBJS
|
||||
PC_LIBS
|
||||
PC_CFLAGS
|
||||
TARGETS
|
||||
PICFLAG
|
||||
LIBMXML
|
||||
DSOFLAGS
|
||||
@ -4505,6 +4506,13 @@ else
|
||||
esac
|
||||
fi
|
||||
|
||||
if test "$build" = "$host"; then
|
||||
TARGETS="ALLTARGETS"
|
||||
else
|
||||
TARGETS="CROSSTARGETS"
|
||||
fi
|
||||
|
||||
|
||||
if test "$prefix" = "NONE"; then
|
||||
prefix="/usr/local"
|
||||
fi
|
||||
|
13
configure.ac
13
configure.ac
@ -15,7 +15,8 @@ dnl
|
||||
dnl Package name and version...
|
||||
AC_INIT([Mini-XML], [2.11], [https://github.com/michaelrsweet/mxml/issues], [mxml], [https://michaelrsweet.github.io/mxml])
|
||||
|
||||
dnl Get the compile host and split the host_os value
|
||||
dnl Get the build and host platforms and split the host_os value
|
||||
AC_CANONICAL_BUILD
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
[host_os_name=`echo $host_os | sed -e '1,$s/[0-9.]*$//g'`]
|
||||
@ -280,6 +281,14 @@ else
|
||||
esac
|
||||
fi
|
||||
|
||||
dnl Determine whether we are cross-compiling...
|
||||
if test "$build" = "$host"; then
|
||||
TARGETS="ALLTARGETS"
|
||||
else
|
||||
TARGETS="CROSSTARGETS"
|
||||
fi
|
||||
AC_SUBST(TARGETS)
|
||||
|
||||
dnl Fix "prefix" variable if it hasn't been specified...
|
||||
if test "$prefix" = "NONE"; then
|
||||
prefix="/usr/local"
|
||||
@ -330,4 +339,4 @@ AC_SUBST(PC_CFLAGS)
|
||||
AC_SUBST(PC_LIBS)
|
||||
|
||||
dnl Output the makefile, etc...
|
||||
AC_OUTPUT(Makefile mxml.list mxml.pc)
|
||||
AC_OUTPUT(Makefile mxml.pc)
|
||||
|
1290
doc/mxml.man
Normal file
1290
doc/mxml.man
Normal file
File diff suppressed because it is too large
Load Diff
94
mxml.list.in
94
mxml.list.in
@ -1,94 +0,0 @@
|
||||
#
|
||||
# EPM software list file for Mini-XML, a small XML library.
|
||||
#
|
||||
# Copyright 2003-2017 by Michael R Sweet.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
# property of Michael R Sweet and are protected by Federal copyright
|
||||
# law. Distribution and use rights are outlined in the file "COPYING"
|
||||
# which should have been included with this file. If this file is
|
||||
# missing or damaged, see the license at:
|
||||
#
|
||||
# https://michaelrsweet.github.io/mxml
|
||||
#
|
||||
|
||||
# Directories...
|
||||
$prefix=@prefix@
|
||||
$exec_prefix=@exec_prefix@
|
||||
$bindir=@bindir@
|
||||
$datarootdir=@datarootdir@
|
||||
$docdir=@docdir@
|
||||
$includedir=@includedir@
|
||||
$libdir=@libdir@
|
||||
$mandir=@mandir@
|
||||
$srcdir=@srcdir@
|
||||
|
||||
$PICFLAG=@PICFLAG@
|
||||
|
||||
# Product information
|
||||
%product mxml
|
||||
%copyright 2003-2017 by Michael R Sweet
|
||||
%vendor Michael R Sweet
|
||||
%license ${srcdir}/COPYING
|
||||
%readme ${srcdir}/README.md
|
||||
%version @VERSION@
|
||||
|
||||
%description <<EOF
|
||||
Mini-XML is a small XML parsing library that you can use to read XML data files
|
||||
or strings in your application without requiring large non-standard libraries.
|
||||
Mini-XML provides the following functionality:
|
||||
|
||||
- Reading of UTF-8 and UTF-16 and writing of UTF-8 encoded XML files and
|
||||
strings.
|
||||
- Data is stored in a linked-list tree structure, preserving the XML data
|
||||
hierarchy.
|
||||
- SAX (streamed) reading of XML files and strings to minimize memory usage.
|
||||
- Supports arbitrary element names, attributes, and attribute values with no
|
||||
preset limits, just available memory.
|
||||
- Supports integer, real, opaque ("cdata"), and text data types in "leaf" nodes.
|
||||
- Functions for creating and managing trees of data.
|
||||
- "Find" and "walk" functions for easily locating and navigating trees of data.
|
||||
|
||||
Mini-XML doesn't do validation or other types of processing on the data
|
||||
based upon schema files or other sources of definition information.
|
||||
EOF
|
||||
|
||||
# Executables
|
||||
f 0555 root sys ${bindir}/mxmldoc mxmldoc
|
||||
|
||||
# Header files
|
||||
f 0444 root sys ${includedir}/mxml.h mxml.h
|
||||
|
||||
# Libraries
|
||||
%if $PICFLAG
|
||||
%system hpux
|
||||
f 0555 root sys ${libdir}/libmxml.sl.1 libmxml.sl.1
|
||||
l 0555 root sys ${libdir}/libmxml.sl libmxml.sl.1
|
||||
|
||||
%system darwin
|
||||
f 0555 root sys ${libdir}/libmxml.1.dylib libmxml.1.dylib
|
||||
l 0555 root sys ${libdir}/libmxml.dylib libmxml.1.dylib
|
||||
|
||||
%system freebsd irix linux netbsd openbsd solaris tru64
|
||||
f 0555 root sys ${libdir}/libmxml.so.1.5 libmxml.so.1.5
|
||||
l 0555 root sys ${libdir}/libmxml.so.1 libmxml.so.1.5
|
||||
l 0555 root sys ${libdir}/libmxml.so libmxml.so.1.5
|
||||
|
||||
%system all
|
||||
%endif
|
||||
|
||||
f 0444 root sys ${libdir}/libmxml.a libmxml.a
|
||||
|
||||
# pkg-config info
|
||||
f 0444 root sys $(libdir)/pkgconfig/mxml.pc mxml.pc
|
||||
|
||||
# Documentation
|
||||
f 0444 root sys ${docdir}/README $srcdir/README.md
|
||||
f 0444 root sys ${docdir}/COPYING $srcdir/COPYING
|
||||
f 0444 root sys ${docdir}/CHANGES $srcdir/CHANGES.md
|
||||
f 0444 root sys ${docdir}/mxml.html $srcdir/doc/mxml.html
|
||||
f 0444 root sys ${docdir}/mxml.pdf $srcdir/doc/mxml.pdf
|
||||
|
||||
# Man pages
|
||||
f 0444 root sys ${mandir}/man1/mxmldoc.1 $srcdir/mxmldoc.man
|
||||
f 0444 root sys ${mandir}/man3/mxml.3 $srcdir/mxml.man
|
Loading…
Reference in New Issue
Block a user