mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-15 00:38:15 +00:00
Fix installation when building from outside the source directory.
Closes SF patch #566901.
This commit is contained in:
parent
51be5c3e5d
commit
06f03f92da
1 changed files with 17 additions and 16 deletions
|
@ -40,15 +40,16 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|||
INSTALL_DATA = @INSTALL_DATA@
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs
|
||||
|
||||
APIHEADER = expat.h
|
||||
MANFILE = $(srcdir)/doc/xmlwf.1
|
||||
APIHEADER = $(srcdir)/lib/expat.h
|
||||
LIBRARY = libexpat.la
|
||||
|
||||
|
||||
default: buildlib xmlwf/xmlwf
|
||||
|
||||
buildlib: lib/$(LIBRARY)
|
||||
buildlib: $(LIBRARY)
|
||||
|
||||
all: lib/$(LIBRARY) xmlwf/xmlwf examples/elements examples/outline
|
||||
all: $(LIBRARY) xmlwf/xmlwf examples/elements examples/outline
|
||||
|
||||
clean:
|
||||
cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs
|
||||
|
@ -70,12 +71,12 @@ check: tests/runtests
|
|||
install: xmlwf/xmlwf installlib
|
||||
$(mkinstalldirs) $(bindir) $(mandir)
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(bindir)/xmlwf
|
||||
$(INSTALL_DATA) doc/xmlwf.1 $(mandir)
|
||||
$(INSTALL_DATA) $(MANFILE) $(mandir)
|
||||
|
||||
installlib: lib/$(LIBRARY) lib/$(APIHEADER)
|
||||
installlib: $(LIBRARY) $(APIHEADER)
|
||||
$(mkinstalldirs) $(libdir) $(includedir)
|
||||
$(LIBTOOL) --mode=install $(INSTALL) lib/$(LIBRARY) $(libdir)/$(LIBRARY)
|
||||
$(INSTALL_DATA) lib/$(APIHEADER) $(includedir)
|
||||
$(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(libdir)/$(LIBRARY)
|
||||
$(INSTALL_DATA) $(APIHEADER) $(includedir)
|
||||
|
||||
uninstall: uninstalllib
|
||||
$(LIBTOOL) --mode=uninstall rm -f $(bindir)/xmlwf
|
||||
|
@ -94,7 +95,7 @@ mkdir-init:
|
|||
CC = @CC@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
|
||||
INCLUDES = -Ilib -I.
|
||||
INCLUDES = -I$(srcdir)/lib -I.
|
||||
LDFLAGS = @LDFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CFLAGS = @CFLAGS@
|
||||
|
@ -109,7 +110,7 @@ LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG)
|
|||
LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@
|
||||
|
||||
LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo
|
||||
lib/$(LIBRARY): $(LIB_OBJS)
|
||||
$(LIBRARY): $(LIB_OBJS)
|
||||
$(LINK_LIB) $(LIB_OBJS)
|
||||
|
||||
lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \
|
||||
|
@ -129,20 +130,20 @@ 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) lib/$(LIBRARY)
|
||||
$(LINK_EXE) $(XMLWF_OBJS) lib/$(LIBRARY)
|
||||
xmlwf/xmlwf: $(XMLWF_OBJS) $(LIBRARY)
|
||||
$(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY)
|
||||
|
||||
examples/elements.o: examples/elements.c
|
||||
examples/elements: examples/elements.o lib/$(LIBRARY)
|
||||
$(LINK_EXE) $< lib/$(LIBRARY)
|
||||
examples/elements: examples/elements.o $(LIBRARY)
|
||||
$(LINK_EXE) $< $(LIBRARY)
|
||||
|
||||
examples/outline.o: examples/outline.c
|
||||
examples/outline: examples/outline.o lib/$(LIBRARY)
|
||||
$(LINK_EXE) $< lib/$(LIBRARY)
|
||||
examples/outline: examples/outline.o $(LIBRARY)
|
||||
$(LINK_EXE) $< $(LIBRARY)
|
||||
|
||||
tests/chardata.o: tests/chardata.c tests/chardata.h
|
||||
tests/runtests.o: tests/runtests.c tests/chardata.h
|
||||
tests/runtests: tests/runtests.o tests/chardata.o lib/$(LIBRARY)
|
||||
tests/runtests: tests/runtests.o tests/chardata.o $(LIBRARY)
|
||||
$(LINK_EXE) $^ -lcheck
|
||||
|
||||
tests/xmltest.zip:
|
||||
|
|
Loading…
Add table
Reference in a new issue