summaryrefslogtreecommitdiff
path: root/Makefile.in
blob: 71629213cabe62a1a8a837468b2857487b1c9007 (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
#
# Top-level Makefile for APRUTIL
#

TARGET_LIB = libaprutil.la
TARGET_EXPORTS = aprutil.exports
INSTALL_SUBDIRS = @APR_XML_DIR@

TARGETS = delete-lib $(TARGET_LIB) delete-exports $(TARGET_EXPORTS)

# bring in rules.mk for standard functionality
@INCLUDE_RULES@

SUBDIRS = buckets crypto dbm encoding hooks uri xml misc
CLEAN_SUBDIRS = . test

CLEAN_TARGETS = $(TARGET_EXPORTS)
DISTCLEAN_TARGETS = config.cache config.log config.status libtool \
	include/private/apu_config.h include/private/apu_private.h \
	include/private/apu_select_dbm.h include/apu.h export_vars.sh
EXTRACLEAN_TARGETS = configure aclocal.m4 include/private/apu_config.h.in

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

delete-lib:
	@if test -f $(TARGET_LIB); then \
	    objects="`find $(SUBDIRS) -name expat -prune -o -name '*.@so_ext@' -a -newer $(TARGET_LIB) -print`" ; \
	    if test -n "$$objects"; then \
		echo Found newer objects. Will relink $(TARGET_LIB). ; \
		echo $(RM) -f $(TARGET_LIB) ; \
		$(RM) -f $(TARGET_LIB) ; \
	    fi; \
	fi

install: $(TARGET_LIB)
	if [ ! -d $(includedir) ]; then \
	    @APR_SOURCE_DIR@/build/mkdir.sh $(includedir); \
	fi; \
	cp include/*.h $(includedir); \
	if [ ! -d $(libdir) ]; then \
	    @APR_SOURCE_DIR@/build/mkdir.sh $(libdir); \
	fi; \
	$(LIBTOOL) --mode=install cp $(TARGET_LIB) $(libdir); \
	if test -n "$(INSTALL_SUBDIRS)"; then \
		for i in $(INSTALL_SUBDIRS); do \
			( cd $$i ; $(MAKE) install ); \
		done \
	fi

$(TARGET_LIB):
	@objects="`find $(SUBDIRS) -name expat -prune -o -name '*.@so_ext@' -print`"; \
	    $(LINK) @lib_target@ @EXPAT_LINK@

delete-exports:
	@if test -f $(TARGET_EXPORTS); then \
	    headers="`find include/*.h -newer $(TARGET_EXPORTS) -print`" ; \
	    if test -n "$$headers"; then \
		echo Found newer headers. Will rebuild $(TARGET_EXPORTS). ; \
		echo $(RM) -f $(TARGET_EXPORTS) ; \
		$(RM) -f $(TARGET_EXPORTS) ; \
	    fi \
	fi

$(TARGET_EXPORTS):
	$(AWK) -f @APR_SOURCE_DIR@/build/make_export.awk include/*.h > $@ ;

docs:
	mkdir ./docs
	perl @APR_SOURCE_DIR@/build/scandoc.pl -i./build/default.pl -p./docs/ ./include/*.h


.PHONY: delete-lib delete-exports