summaryrefslogtreecommitdiffstats
path: root/rules/memtest.make
blob: da9d1fc047920e8bed2b46a2b110d34c020957ae (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
# -*-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_SOURCE):
	@$(call targetinfo)
	@$(call get, MEMTEST)

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

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

$(STATEDIR)/memtest.prepare:
	@$(call targetinfo)
	@$(call touch)

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

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

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

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

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

$(STATEDIR)/memtest.targetinstall:
	@$(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 $(PKGDIR)/memtest_*
	rm -rf $(MEMTEST_DIR)

# vim: syntax=make