More on make

I think I’ve found a bug in Solaris make.  I’ve spent lots of time this week trying to fix the dependancy problem in my makefile for package building that was causing my rule to convert a tarball to a directory to ALWAYS run. Turns out the problem only exists in Solaris make (GNU Make on linux or Solaris, and AIX make work fine). I know lots of people say you shouldn’t use directories as make targets, but there are situations where you want to do something if a file has been added to a directory or do something with a directory if a file has changed.  In particular, if I get a new tarball, I want to untar it and recompile, if I’ve done that I want to build a new packaging directory, if I’ve updated the packaging directory, I want to build a new package; Solaris packages themselves are directories by default and I like to convert them to filestream format for ease of use; and so forth.

The good news is that I’ve learned a lot about make while trying to figure this out.  At this rate the pages in the “make” section are going to start falling out of my copy of UNIX in a Nutshell along with the awk and sed sections and the page on “test” – not that it’s not a miracle that it’s even still held together at all given how much I use it.  And I’ve finally actually read most of Managing Projects With Make.

I tried to report the make problem to Sun, since we have support contracts, but someone forgot to put me on the list of technical contacts when we renewed our contracts.  Admittedly, most of the other SA’s here just have the operators call Sun for them so I guess it’s a reasonable mistake – but one of the things I like about working here is that we have good support and if I can’t use it, it’s useless to me.  (Of course, the drawback of having support is that at some point you are supposed to use support instead of tinkering with whatever the problem is yourself even when it’s fascinating.)  Hopefully the contract wrinkle will be worked out sometime next week.  It’s not like I can’t just use GNU make, but heck we pay for this OS, when it’s broken, it should get fixed.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: