summaryrefslogtreecommitdiffstats
path: root/rules/template-class-existing-target
blob: 9c7c804299683d10a13b733925f0a4e8b5943a20 (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
# -*-makefile-*-
# $Id$
#
# Copyright (C) @YEAR@ by @AUTHOR@
#
# 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
#
@CLASS@PACKAGES-$(PTXCONF_@CLASS@@PACKET@) += @class@@packet@

#
# Paths and names
#
@CLASS@@PACKET@_DIR	= $(@CLASS@BUILDDIR)/$(@PACKET@)

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

@class@@packet@_get: $(STATEDIR)/@class@@packet@.get

$(STATEDIR)/@class@@packet@.get: $(STATEDIR)/@packet@.get
	@$(call targetinfo, $@)
	@$(call touch, $@)

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

@class@@packet@_extract: $(STATEDIR)/@class@@packet@.extract

$(STATEDIR)/@class@@packet@.extract: $(@class@@packet@_extract_deps_default)
	@$(call targetinfo, $@)
	@$(call clean, $(@CLASS@@PACKET@_DIR))
	@$(call extract, @PACKET@, $(@CLASS@BUILDDIR))
	@$(call patchin, @PACKET@, $(@CLASS@@PACKET@_DIR))
	@$(call touch, $@)

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

@class@@packet@_prepare: $(STATEDIR)/@class@@packet@.prepare

@CLASS@@PACKET@_PATH	:= PATH=$(@CLASS@PATH)
@CLASS@@PACKET@_ENV 	:= $(@CLASS@ENV)

#
# autoconf
#
@CLASS@@PACKET@_AUTOCONF	:= $(@AUTOCONF_CLASS@AUTOCONF)

$(STATEDIR)/@class@@packet@.prepare: $(@class@@packet@_prepare_deps_default)
	@$(call targetinfo, $@)
	@$(call clean, $(@CLASS@@PACKET@_DIR)/config.cache)
	cd $(@CLASS@@PACKET@_DIR) && \
		$(@CLASS@@PACKET@_PATH) $(@CLASS@@PACKET@_ENV) \
		./configure $(@CLASS@@PACKET@_AUTOCONF)
	@$(call touch, $@)

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

@class@@packet@_compile: $(STATEDIR)/@class@@packet@.compile

$(STATEDIR)/@class@@packet@.compile: $(@class@@packet@_compile_deps_default)
	@$(call targetinfo, $@)
	cd $(@CLASS@@PACKET@_DIR) && $(@CLASS@@PACKET@_PATH) $(MAKE) $(PARALLELMFLAGS)
	@$(call touch, $@)

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

@class@@packet@_install: $(STATEDIR)/@class@@packet@.install

$(STATEDIR)/@class@@packet@.install: $(@class@@packet@_install_deps_default)
	@$(call targetinfo, $@)
	@$(call install, @CLASS@@PACKET@,,h)
	@$(call touch, $@)

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

@class@@packet@_clean:
	rm -rf $(STATEDIR)/@class@@packet@.*
	rm -rf $(@CLASS@@PACKET@_DIR)

# vim: syntax=make