aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/lmbench/Makefile
blob: d4920863270094b339ffe24cdca952c23f42b8fc (plain) (blame)
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
# New ports collection makefile for:    lmbench
# Date created:     6 May 1995
# Whom:         asami
#
# $FreeBSD$
#

PORTNAME=   lmbench
PORTVERSION=    1.1
CATEGORIES= benchmarks
MASTER_SITES=   ftp://ftp.deva.net/pub/sources/system/benchmarks/ \
        ftp://ftp.kuis.kyoto-u.ac.jp/misc/benchmarks/ \
        ftp://ftp.netlab.is.tsukuba.ac.jp/pub/utils/benchmark/
DISTNAME=   ${PORTNAME}
EXTRACT_SUFX=   .tar.Z

MAINTAINER= fenner@FreeBSD.org

ALL_TARGET= build
MAKE_ENV=   PATH=${PATH}:${WRKSRC}/scripts
MAN1=       bargraph.1 graph.1
MAN8=       bw_file_rd.8 bw_mem_cp.8 bw_mem_rd.8 bw_mem_wr.8 \
        bw_mmap_rd.8 bw_pipe.8 bw_tcp.8 lat_connect.8 lat_ctx.8 \
        lat_fs.8 lat_mem_rd.8 lat_mmap.8 lat_pagefault.8 lat_pipe.8 \
        lat_proc.8 lat_rpc.8 lat_syscall.8 lat_tcp.8 lat_udp.8 \
        lmbench.8 lmdd.8 mhz.8

test: build
    @(cd ${WRKSRC}; make results)

retest: build
    @(cd ${WRKSRC}; make rerun)

# The distribution comes with unwritable files; patch's magic RCS behavior
# causes files to be checked out of RCS before being patched.  If an $Id$
# string is in the patch, this behavior causes the string to change to
# reflect the locker, meaning that the patch will probably fail.  Instead,
# just chmod +w the files.
PATCHEDFILES=   src/Makefile scripts/config-run scripts/getbg
pre-patch:
.for f in ${PATCHEDFILES}
    @${CHMOD} +w ${WRKSRC}/${f}
.endfor

pre-install:
    [ -d ${PREFIX}/lib/lmbench ] || ${MKDIR} ${PREFIX}/lib/lmbench

do-install:
    ${CP} ${FILESDIR}/Makefile ${PREFIX}/lib/lmbench
    tar --exclude \*.orig -C ${WRKSRC} -cf - Results bin scripts | \
      tar -C ${PREFIX}/lib/lmbench -xf -
.for man in ${MAN1}
    ${INSTALL_MAN} ${WRKSRC}/doc/${man} ${PREFIX}/man/man1
.endfor
.for man in ${MAN8}
    ${INSTALL_MAN} ${WRKSRC}/doc/${man} ${PREFIX}/man/man8
.endfor

.include <bsd.port.mk>