|
From: | Glenn Fowler |
Subject: | Re: RFC: .ALIAS builtin pseudotarget |
Date: | Fri, 24 Sep 2004 20:52:52 -0400 (EDT) |
I've attached three makefiles to illustrate the difference between using a variable, Makefile.var a .PHONY target, Makefile.phony and an .ALIAS target Makefile.alias to hold a common prereq list for a collection of targets. Makefile.alias assumes the .ALIAS patch has been applied. Also attached is a shell script test.alias to show the makefiles in action. This script produces the following on my linux box: var.1 checks=1017755 commands=2000 files=2000 var.2 checks=2005756 commands=0 files=2000 phony.1 checks=19759 commands=2000 files=2000 phony.2 checks=13759 commands=1000 files=2000 alias.1 checks=20761 commands=2000 files=2000 alias.2 checks=9762 commands=0 files=2000 The varable solution forces make to do a million checks, but the second run results in no actions executed. The phony solution does better on the checks but the second run re-executes half the actions. The alias solution cuts down on the checks and executes no actions on the second run. -- Glenn Fowler -- AT&T Research, Florham Park NJ --
Makefile.var
Description: Text document
Makefile.phony
Description: Text document
Makefile.alias
Description: Text document
test.alias
Description: application/sh
[Prev in Thread] | Current Thread | [Next in Thread] |