summaryrefslogtreecommitdiffstats
path: root/rules/xcb-proto.make
blob: 5ff524107daebc4ecc366213ad9f98dfc9c33ee3 (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
# -*-makefile-*-
# $Id: template-make 8008 2008-04-15 07:39:46Z mkl $
#
# Copyright (C) 2007 by Michael Olbrich <m.olbrich@pengutronix.de>
# Copyright (C) 2008 by Robert Schwebel
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_XCB_PROTO) += xcb-proto

#
# Paths and names
#
XCB_PROTO_VERSION	:= 1.1
XCB_PROTO		:= xcb-proto-$(XCB_PROTO_VERSION)
XCB_PROTO_SUFFIX	:= tar.bz2
XCB_PROTO_URL		:= http://xcb.freedesktop.org/dist/$(XCB_PROTO).$(XCB_PROTO_SUFFIX)
XCB_PROTO_SOURCE	:= $(SRCDIR)/$(XCB_PROTO).$(XCB_PROTO_SUFFIX)
XCB_PROTO_DIR		:= $(BUILDDIR)/$(XCB_PROTO)

# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------

$(STATEDIR)/xcb-proto.get:
	@$(call targetinfo, $@)
	@$(call touch, $@)

$(XCB_PROTO_SOURCE):
	@$(call targetinfo, $@)
	@$(call get, XCB_PROTO)

# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------

$(STATEDIR)/xcb-proto.extract:
	@$(call targetinfo, $@)
	@$(call clean, $(XCB_PROTO_DIR))
	@$(call extract, XCB_PROTO)
	@$(call patchin, XCB_PROTO)
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

XCB_PROTO_PATH	:= PATH=$(CROSS_PATH)
XCB_PROTO_ENV 	:= $(CROSS_ENV)

#
# autoconf
#
XCB_PROTO_AUTOCONF := $(CROSS_AUTOCONF_USR)

$(STATEDIR)/xcb-proto.prepare:
	@$(call targetinfo, $@)
	@$(call clean, $(XCB_PROTO_DIR)/config.cache)
	cd $(XCB_PROTO_DIR) && \
		$(XCB_PROTO_PATH) $(XCB_PROTO_ENV) \
		./configure $(XCB_PROTO_AUTOCONF)
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------

$(STATEDIR)/xcb-proto.compile:
	@$(call targetinfo, $@)
	cd $(XCB_PROTO_DIR) && $(XCB_PROTO_PATH) $(MAKE) $(PARALLELMFLAGS)
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

$(STATEDIR)/xcb-proto.install:
	@$(call targetinfo, $@)
	@$(call install, XCB_PROTO)
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/xcb-proto.targetinstall:
	@$(call targetinfo, $@)
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------

xcb-proto_clean:
	rm -rf $(STATEDIR)/xcb-proto.*
	rm -rf $(IMAGEDIR)/xcb-proto_*
	rm -rf $(XCB_PROTO_DIR)

# vim: syntax=make