summaryrefslogtreecommitdiff
path: root/Makefile.in
blob: 97613ed388ebc9b0fdd3b86577f160fd2252d247 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
################################################################
# Process this file with top-level configure script to produce Makefile
#
# Copyright 2000 Clark Cooper
#
#  This file is part of EXPAT.
#
#  EXPAT is free software; you can redistribute it and/or modify it
#  under the terms of the License (based on the MIT/X license) contained
#  in the file COPYING that comes with this distribution.
#
# EXPAT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN EXPAT.
#
#  ---
#  I started using automake, but
#		1) it seemed like overkill
#		2) I don't want all the GNU policies
#		3) I wanted more explicit control over what gets built
#
#  So I'm doing my Makefile.in files manually. But a fair part is based
#  on what I learned from perusing the Makefile.in's generated by automake,
#  and the automake authors still get my kudos.
#

SHELL = @SHELL@

srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@

bindir = @bindir@
libdir = @libdir@
includedir = @includedir@

top_builddir = .


INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs

CC = @CC@

LIBTOOL = @LIBTOOL@

CONFIG_HEADERS = config.h

APIHEADER = expat.h
LIBRARY = libexpat.la


default:  library xmlwf

buildlib: library

all: library wfchecker samples

library:
	cd lib && $(MAKE)

wfchecker:
	cd xmlwf && $(MAKE)

samples:
	cd examples && $(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
	rm -f config.h.in configure
	rm -f conftools/config.guess conftools/config.sub
	rm -f conftools/ltconfig conftools/ltmain.sh

check:	all
	cd tests && $(MAKE) check

install: xmlwf/xmlwf lib/$(LIBRARY) lib/$(APIHEADER)
	$(mkinstalldirs) $(bindir) $(libdir) $(includedir)
	$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(bindir)/xmlwf
	$(LIBTOOL) --mode=install $(INSTALL) lib/$(LIBRARY) $(libdir)/$(LIBRARY)
	$(INSTALL_DATA) lib/$(APIHEADER) $(includedir)

uninstall:
	$(LIBTOOL) --mode=uninstall rm -f $(bindir)/xmlwf
	$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(LIBRARY)
	rm -f $(libdir)/$(APIHEADER)

.PHONY: buildlib all library wfchecker samples \
	clean distclean extraclean maintainer-clean \
	dist distdir \
	install uninstall