summaryrefslogtreecommitdiff
path: root/Makefile.in
blob: 148402d211824e181ebc889e1c75f126467e2075 (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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#
# APR (Apache Portable Runtime) library Makefile.
#
CPP = @CPP@

# get substituted into some targets
APR_MAJOR_VERSION=@APR_MAJOR_VERSION@

#
# Macros for supporting directories
#
INCDIR=./include
OSDIR=$(INCDIR)/arch/@OSDIR@
DEFOSDIR=$(INCDIR)/arch/@DEFAULT_OSDIR@
INCLUDES=-I$(INCDIR) -I$(OSDIR) -I$(DEFOSDIR)

#
# Macros for target determination
#
CLEAN_SUBDIRS= test
INSTALL_SUBDIRS=@INSTALL_SUBDIRS@

TARGET_LIB = lib@APR_LIBNAME@.la

#
# Rules for building specific targets, starting with 'all' for
# building the entire package.
#
TARGETS = $(TARGET_LIB) export_vars.h apr.exp

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

CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.h
DISTCLEAN_TARGETS = config.cache config.log config.status \
	include/apr.h include/arch/unix/apr_private.h \
	libtool apr-config build/apr_rules.mk
EXTRACLEAN_TARGETS = configure aclocal.m4 include/arch/unix/apr_private.h.in \
	build-outputs.mk build/ltcf-c.sh build/ltmain.sh build/libtool.m4

prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
includedir=@includedir@
installbuilddir=@installbuilddir@
srcdir=@srcdir@
VPATH=@srcdir@
top_srcdir=@apr_srcdir@
top_blddir=@apr_builddir@


# Create apr-config script suitable for the install tree
apr-config.out: apr-config
	sed 's,^\(location=\).*$$,\1installed,' < apr-config > $@

install: $(TARGET_LIB) apr-config.out
	if [ ! -d $(DESTDIR)$(includedir) ]; then \
	    $(top_srcdir)/build/mkdir.sh $(DESTDIR)$(includedir); \
	fi;
	cp -p $(top_srcdir)/include/*.h $(DESTDIR)$(includedir);

	if test -n "$(top_blddir)"; then \
	    cp -p $(top_blddir)/include/*.h $(DESTDIR)$(includedir); \
	fi;
	if [ ! -d $(DESTDIR)$(libdir) ]; then \
	    $(top_srcdir)/build/mkdir.sh $(DESTDIR)$(libdir); \
	fi;
	$(LIBTOOL) --mode=install cp $(TARGET_LIB) $(DESTDIR)$(libdir)
	$(LIBTOOL) --mode=install cp apr.exp $(DESTDIR)$(libdir)
	if [ ! -d $(DESTDIR)$(installbuilddir) ]; then \
	   	$(top_srcdir)/build/mkdir.sh $(DESTDIR)$(installbuilddir); \
	fi; 
	if [ -f libtool ]; then \
		$(LIBTOOL) --mode=install cp libtool $(DESTDIR)$(installbuilddir); \
	fi;
	if [ -f shlibtool ]; then \
		$(LIBTOOL) --mode=install cp shlibtool $(DESTDIR)$(installbuilddir); \
	fi;
	if [ -f build/apr_rules.mk ]; then \
		cp build/apr_rules.mk $(DESTDIR)$(installbuilddir); \
	fi;

	if [ ! -d $(DESTDIR)$(bindir) ]; then \
	    $(top_srcdir)/build/mkdir.sh $(DESTDIR)$(bindir); \
	fi;
	$(LIBTOOL) --mode=install cp apr-config.out $(DESTDIR)$(bindir)/apr-config
	chmod 755 $(DESTDIR)$(bindir)/apr-config
	@if [ $(INSTALL_SUBDIRS) != "none" ]; then \
            for i in $(INSTALL_SUBDIRS); do \
	        ( cd $$i ; $(MAKE) DESTDIR=$(DESTDIR) install ); \
	    done \
	fi

$(TARGET_LIB): $(OBJECTS)
	$(LINK) @lib_target@ $(ALL_LIBS)

exports.c: $(HEADERS)
	$(AWK) -f $(top_srcdir)/build/make_exports.awk $^ > $@

export_vars.h: $(HEADERS)
	$(AWK) -f $(top_srcdir)/build/make_var_export.awk $^ > $@

apr.exp: exports.c export_vars.h
	@echo "#! lib@APR_LIBNAME@.so" > $@
	@echo "* This file was AUTOGENERATED at build time." >> $@
	@echo "* Please do not edit by hand." >> $@
	$(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
	$(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@

dox:
	doxygen $(top_srcdir)/docs/doxygen.conf

check: $(TARGET_LIB)
	(cd test && $(MAKE) check)

etags:
	etags `find . -name '*.[ch]'`

# DO NOT REMOVE
docs: $(INCDIR)/*.h