summaryrefslogtreecommitdiffstats
path: root/rules/memtest.make
blob: 849250836037d610e179926ba0040dcfd7a05970 (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
123
124
125
126
127
128
# -*-makefile-*-
# $Id$
#
# Copyright (C) 2004 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_MEMTEST) += memtest

#
# Paths and names
#
MEMTEST_VERSION		= 0.0.4
MEMTEST			= memtest-$(MEMTEST_VERSION)
MEMTEST_SUFFIX		= tar.bz2
MEMTEST_URL		= http://carpanta.dc.fi.udc.es/~quintela/memtest/$(MEMTEST).$(MEMTEST_SUFFIX)
MEMTEST_SOURCE		= $(SRCDIR)/$(MEMTEST).$(MEMTEST_SUFFIX)
MEMTEST_DIR		= $(BUILDDIR)/$(MEMTEST)


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

memtest_get: $(STATEDIR)/memtest.get

$(STATEDIR)/memtest.get: $(memtest_get_deps_default)
	@$(call targetinfo, $@)
	@$(call touch, $@)

$(MEMTEST_SOURCE):
	@$(call targetinfo, $@)
	@$(call get, MEMTEST)

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

memtest_extract: $(STATEDIR)/memtest.extract

$(STATEDIR)/memtest.extract: $(memtest_extract_deps_default)
	@$(call targetinfo, $@)
	@$(call clean, $(MEMTEST_DIR))
	@$(call extract, MEMTEST)
	@$(call patchin, MEMTEST)
	@$(call touch, $@)

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

memtest_prepare: $(STATEDIR)/memtest.prepare

MEMTEST_PATH	=  PATH=$(CROSS_PATH)
MEMTEST_ENV 	=  $(CROSS_ENV)

#
# autoconf
#
MEMTEST_AUTOCONF =  $(CROSS_AUTOCONF_USR)

$(STATEDIR)/memtest.prepare: $(memtest_prepare_deps_default)
	@$(call targetinfo, $@)
	@$(call clean, $(MEMTEST_DIR)/config.cache)
	@$(call touch, $@)

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

memtest_compile: $(STATEDIR)/memtest.compile

$(STATEDIR)/memtest.compile: $(memtest_compile_deps_default)
	@$(call targetinfo, $@)
	cd $(MEMTEST_DIR) && $(MEMTEST_ENV) $(MEMTEST_PATH) make mtest
	@$(call touch, $@)

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

memtest_install: $(STATEDIR)/memtest.install

$(STATEDIR)/memtest.install: $(memtest_install_deps_default)
	@$(call targetinfo, $@)
	@$(call touch, $@)

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

memtest_targetinstall: $(STATEDIR)/memtest.targetinstall

$(STATEDIR)/memtest.targetinstall: $(memtest_targetinstall_deps_default)
	@$(call targetinfo, $@)

	@$(call install_init, memtest)
	@$(call install_fixup, memtest,PACKAGE,memtest)
	@$(call install_fixup, memtest,PRIORITY,optional)
	@$(call install_fixup, memtest,VERSION,$(MEMTEST_VERSION))
	@$(call install_fixup, memtest,SECTION,base)
	@$(call install_fixup, memtest,AUTHOR,"Robert Schwebel <r.schwebel\@pengutronix.de>")
	@$(call install_fixup, memtest,DEPENDS,)
	@$(call install_fixup, memtest,DESCRIPTION,missing)

	@$(call install_copy, memtest, 0, 0, 0755, $(MEMTEST_DIR)/mtest, /usr/sbin/memtest)

	@$(call install_finish, memtest)

	@$(call touch, $@)

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

memtest_clean:
	rm -rf $(STATEDIR)/memtest.*
	rm -rf $(IMAGEDIR)/memtest_*
	rm -rf $(MEMTEST_DIR)

# vim: syntax=make