File: depend

package info (click to toggle)
lmbench 3.0-a9%2Bdebian.1-6
  • links: PTS
  • area: non-free
  • in suites: bookworm
  • size: 2,996 kB
  • sloc: ansic: 12,328; perl: 6,531; sh: 2,784; makefile: 731
file content (28 lines) | stat: -rwxr-xr-x 667 bytes parent folder | download | duplicates (5)
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

# Figure out dependencies for lmbench src.
#
# Hacked into existence by Larry McVoy (lm@sun.com now lm@sgi.com).
# Copyright (c) 1994 Larry McVoy.  GPLed software.
# $Id$
eval 'exec perl -Ssw $0 "$@"'
	if 0;

open(M, "Makefile");
while(<M>) {
	push(@Makefile, $_);
	last if /^..MAKEDEPEND/;
}
close(M);
open(G, "gcc -MM *.c | grep -v mhz.c | grep -v lat_ctx.c|");
while (<G>) {
	@_ = chop;
	@_ = split(/:/);
	$_[0] =~ s/\.o\s*$//;
	push(@Makefile, "\$O/$_[0]: $_[1] \$O/lmbench.a\n");
	push(@Makefile, "\t\$(COMPILE) -o \$O/$_[0] $_[0].c \$O/lmbench.a \$(LDLIBS)\n\n");
}
system "mv Makefile Makefile.old";
open(M, ">Makefile");
print M @Makefile;
close(M);
exit 0;