[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

make: you guys are gawds

From: Stephan Beal
Subject: make: you guys are gawds
Date: Wed, 9 May 2001 17:04:06 +0200

$(patsubst %,make, "" auto) guys (er... persons?),

For years I've worked "with" Makefiles, but never really understood 
them. I've often simply felt intimidated or annoyed by their syntax 
more than anything else. Recently, however, I did build tree re-org on 
a project where I was prohibited from using automake. I needed to 
split it into a semi-complex tree, with separate branches for libs, 
bins, includes, etc. During that week I dove into the make manual and 
really started to see what make could automate for me in the absence of 
a helper tool like automake, and without implementing a mini 
automake-like tool. This is all I can say:

You guys are Gawds. 

I wrote this one night:

        convert -negate $< $@

And I sat and looked at it for several minutes, in awed silence. I 
        That's IT!?!?! 
        There's no fokkin way...
        Dependencies, too? 

The elegance, simplicity, and technical beauty behind solutions exactly 
like that one wouldn't be possible without the endless hours of thought 
and excellent code that you guys have put in over many years. 
And once the above is expanded on a bit:
orig_pics=$(shell find . -name "*$(orig)")
%$(negated): %$(orig)
        convert -negate $< $@
all: $(orig_pics)
it becomes a completely reusable makefile for me.

You guys are Gawds.

I now sometimes wonder if automake's output (or even required user 
inputs, like all source and header filenames) couldn't be cut 
drastically by simply taking advantage of more of make's features, 
possibly using make itself to generate it's intermediary makefiles (so 
myapp_SOURCES can be created using $(patsubst 
%,%.cpp,$(myapp_CLASSES)), perhaps)... Of course, I could just be 
ignorant of something which automake can already do.

And now whole trees are built by just setting a couple variables. 
Hell, I could even check my mail with a rule like this, I guess:

iam=$(shell whoami)
/home/$(iam)/inbox: /var/spool/mail/$(iam)


Thank you! You are Gawds. Let me know which of you wants my first 
child and I'll ship it to you as soon as it gets here.

Now anyone says a bad word about make and I'll kick his ass. ;)

Take care,

----- Stephan Beal
Generic Universal Computer Guy
address@hidden -
Office: +49 (89) 552 92 862   Handy: +49 (179) 211 97 67
"...and 'do as you will' shall be the whole of the law." -- ??

reply via email to

[Prev in Thread] Current Thread [Next in Thread]