File: GNUmakefile

package info (click to toggle)
xmlrpc-c 1.06.27-1.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 4,308 kB
  • ctags: 5,111
  • sloc: ansic: 39,324; sh: 8,284; cpp: 6,051; makefile: 1,339; perl: 494; xml: 134
file content (120 lines) | stat: -rw-r--r-- 3,571 bytes parent folder | download | duplicates (2)
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
ifeq ($(SRCDIR)x,x)
SRCDIR = $(CURDIR)
endif
SUBDIR = .
BUILDDIR = $(SRCDIR)
VPATH = .:$(SRCDIR)

include $(SRCDIR)/Makefile.config

SUBDIRS = include lib src tools examples

PROGRAMS_TO_INSTALL = xmlrpc-c-config

# We're in a transition between the bloated, complex GNU
# Autoconf/Automake style of build, in which 'configure' creates all
# the make files, to simpler static make files.  Some directories have
# been converted; some haven't.  So we have the hack of putting
# 'xmlrpc_config.h' as the first dependency of 'all' to make sure
# 'configure runs before anything in the case that the user neglects
# to run 'configure' before doing 'make'.

default: xmlrpc_config.h all

.PHONY: all
all: xmlrpc-c-config xmlrpc-c-config.test $(SUBDIRS:%=%/all)

version.h: $(BUILDDIR)/Makefile.config
	rm -f $@
	echo '/* This file was generated by a make rule */' >>$@
	echo '#define XMLRPC_C_VERSION "$(XMLRPC_C_VERSION)"' >>$@

# We don't want Makefile.common's rule for version.h
OMIT_VERSION_H = Y

# We dont' want Makefile.common's rule for transport_config.h
OMIT_TRANSPORT_CONFIG_H = Y

transport_config.h: $(BUILDDIR)/Makefile.config
	rm -f $@
	echo '/* This file was generated by a make rule */' >>$@
ifeq ($(MUST_BUILD_WININET_CLIENT),yes)
	echo '#define MUST_BUILD_WININET_CLIENT 1' >>$@
else
	echo '#define MUST_BUILD_WININET_CLIENT 0' >>$@
endif
ifeq ($(MUST_BUILD_CURL_CLIENT),yes)
	echo '#define MUST_BUILD_CURL_CLIENT 1' >>$@
else
	echo '#define MUST_BUILD_CURL_CLIENT 0' >>$@
endif
ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes)
	echo '#define MUST_BUILD_LIBWWW_CLIENT 1' >>$@
else
	echo '#define MUST_BUILD_LIBWWW_CLIENT 0' >>$@
endif
	echo "static const char * const XMLRPC_DEFAULT_TRANSPORT =" >>$@
ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes)
	echo '"libwww";' >>$@
else
  ifeq ($(MUST_BUILD_CURL_CLIENT),yes)
	echo '"curl";' >>$@
  else
    ifeq ($(MUST_BUILD_WININET_CLIENT),yes)
	echo '"wininet";' >>$@
    else
	@echo 'ERROR: no client XML transport configured'; rm $@; false
    endif
  endif
endif

.PHONY: clean clean-local
clean: $(SUBDIRS:%=%/clean) clean-common clean-local

clean-local:
	rm -f transport_config.h

.PHONY: distclean distclean-local
distclean: $(SUBDIRS:%=%/distclean) distclean-common distclean-local

distclean-local: clean-local
	rm -f config.log config.status Makefile.config libtool 
	rm -f xmlrpc_config.h xmlrpc_amconfig.h stamp-h 
	rm -f xmlrpc-c-config xmlrpc-c-config.test

check: $(SUBDIRS:%=%/check)

.PHONY: tags
tags: $(SUBDIRS:%=%/tags) TAGS

DISTFILES = 

.PHONY: distdir
distdir: distdir-common

.PHONY: install
install: $(SUBDIRS:%=%/install) install-common install-compat-hdr

.PHONY: install-compat-hdr
install-compat-hdr:
# Install old names of header files for backward compatibility
	cd $(DESTDIR)$(HEADERINST_DIR); \
	  rm -f xmlrpc.h xmlrpc_client.h xmlrpc_server.h xmlrpc_cgi.h \
                xmlrpc_abyss.h xmlrpc_server_w32httpsys.h \
	        XmlRpcCpp.h; \
	  $(LN_S) xmlrpc-c/oldxmlrpc.h         xmlrpc.h; \
	  $(LN_S) xmlrpc-c/client.h            xmlrpc_client.h; \
	  $(LN_S) xmlrpc-c/server.h            xmlrpc_server.h; \
	  $(LN_S) xmlrpc-c/server_cgi.h        xmlrpc_cgi.h; \
	  $(LN_S) xmlrpc-c/server_abyss.h      xmlrpc_abyss.h; \
	  $(LN_S) xmlrpc-c/server_w32httpsys.h xmlrpc_server_w32httpsys.h; \
	  $(LN_S) xmlrpc-c/oldcppwrapper.hpp   XmlRpcCpp.h ;\

.PHONY: dep
dep: version.h $(BUILDDIR)/include/xmlrpc-c/config.h $(SUBDIRS:%=%/dep)

xmlrpc-c-config xmlrpc-c-config.test xmlrpc_config.h xmlrpc_amconfig.h \
	:%:%.in $(SRCDIR)/configure
	$(SRCDIR)/configure

include $(SRCDIR)/Makefile.common