summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2009-03-09 22:50:28 +0000
committerMarc Kleine-Budde <mkl@pengutronix.de>2009-03-09 22:50:28 +0000
commit60df5417d0a6b5e0ddae359c2654c1cb3967d7a5 (patch)
tree17413dbbe20031cc0447d8cb4b4ff7f026a3464a
parent20df05da3b83d9bd2d3c712d3d9a6794cd57504c (diff)
downloadptxdist-60df5417d0a6b5e0ddae359c2654c1cb3967d7a5.tar.gz
ptxdist-60df5417d0a6b5e0ddae359c2654c1cb3967d7a5.tar.xz
[host-timeout] added new programm to run a command with a time limit
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@10037 33e552b5-05e3-0310-8538-816dae2090ed
-rw-r--r--rules/host-timeout.in8
-rw-r--r--rules/host-timeout.make77
2 files changed, 85 insertions, 0 deletions
diff --git a/rules/host-timeout.in b/rules/host-timeout.in
new file mode 100644
index 000000000..6989a8989
--- /dev/null
+++ b/rules/host-timeout.in
@@ -0,0 +1,8 @@
+## SECTION=hosttools_noprompt
+
+config HOST_TIMEOUT
+ tristate
+ help
+ timeout executes a command and imposes an elapsed time
+ limit. When the time limit is reached, timeout sends a
+ predefined signal to the target process. \ No newline at end of file
diff --git a/rules/host-timeout.make b/rules/host-timeout.make
new file mode 100644
index 000000000..a0b40eada
--- /dev/null
+++ b/rules/host-timeout.make
@@ -0,0 +1,77 @@
+# -*-makefile-*-
+# $Id$
+#
+# Copyright (C) 2009 by Marc Kleine-Budde <mkl@pengutronix.de>
+#
+# 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
+#
+HOST_PACKAGES-$(PTXCONF_HOST_TIMEOUT) += host-timeout
+
+#
+# Paths and names
+#
+HOST_TIMEOUT_VERSION := 1.18
+HOST_TIMEOUT := tct-$(HOST_TIMEOUT_VERSION)
+HOST_TIMEOUT_SUFFIX := tar.gz
+HOST_TIMEOUT_URL := http://www.porcupine.org/forensics/$(HOST_TIMEOUT).$(HOST_TIMEOUT_SUFFIX)
+HOST_TIMEOUT_SOURCE := $(SRCDIR)/$(HOST_TIMEOUT).$(HOST_TIMEOUT_SUFFIX)
+HOST_TIMEOUT_DIR := $(HOST_BUILDDIR)/$(HOST_TIMEOUT)
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+$(HOST_TIMEOUT_SOURCE):
+ @$(call targetinfo)
+ @$(call get, HOST_TIMEOUT)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+HOST_TIMEOUT_PATH := PATH=$(HOST_PATH)
+HOST_TIMEOUT_ENV := $(HOST_ENV)
+
+#
+# autoconf
+#
+HOST_TIMEOUT_AUTOCONF := $(HOST_AUTOCONF)
+
+$(STATEDIR)/host-timeout.prepare:
+ @$(call targetinfo)
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/host-timeout.compile:
+ @$(call targetinfo)
+ cd $(HOST_TIMEOUT_DIR)/src/misc && $(HOST_TIMEOUT_PATH) $(MAKE) $(PARALLELMFLAGS_BROKEN) ../../bin/timeout
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/host-timeout.install:
+ @$(call targetinfo)
+ $(INSTALL) -m 755 -D $(HOST_TIMEOUT_DIR)/bin/timeout $(PTXCONF_SYSROOT_HOST)/bin/timeout
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+host-timeout_clean:
+ rm -rf $(STATEDIR)/host-timeout.*
+ rm -rf $(HOST_TIMEOUT_DIR)
+
+# vim: syntax=make