A Solaris 8 make bug

October 31, 2006
; cat Makefile
foo : /tmp/bar
	touch foo
; mkdir /tmp/bar
; make
touch foo
; make
`foo' is up to date.
; touch /tmp/bar/t
; make
`foo' is up to date.
; gmake
touch foo

As 'make -ndd' shows, for some reason Solaris 8's version of make decides that directories always have a timestamp of 0. It knows that they exist, because if you remove /tmp/bar it complains about it. This behavior is the same for both /usr/ccs/bin/make and /usr/xpg4/bin/make.

On a quick test, this bug appears to be gone in Solaris 9. There's a Solaris 8 make patch not applied to our systems, but the README doesn't mention anything like this bug.

(Depending on a directory is the kind of thing you do if you're building something from a bunch of files dropped into a directory, and you need to do something every time a file is added or removed.)

I note in passing that make problems that cause things to not get rebuilt are much more annoying than make problems that cause things to get rebuilt all the time.

Written on 31 October 2006.
« An Internet rule of thumb
The downsides of remailing »

Page tools: View Source, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Tue Oct 31 23:11:15 2006
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.