I'm debugging a makefile. I have no fucking choice: I work on a system built with a big, hairy, stinking pile of intertwingled make snippets. Fuck my life.

I need to support (GASP) *auto-generated* source files. Auto-generated *header* files are NOT AN OPTION: the bloody wanker will fail while generating dependencies of a not-yet-generated file - NO WAY to explain it that it should WAIT until it generates the damned file ITSELF several rules down the pipe. So I manually write kludgy headers which #ifdef on whether it's generating dependencies or not, and #include generated .h files when it is "safe". But I thought I can at least compile generated *source files*.

So I have this program listing the source files to be generated and built. Never mind that if it prints errors, the fucking make system will treat the errors as source files and spectacularly fail. Conditionally calling $(error) from $(foreach) based on the results of $(shell) is not a thing I plan to do soon. The REAL problem is that currently I only have 2 ways of writing the wretched make code:

Way #1 will fail to convince make to actually build the source files.
Way #2 will convince it do that AND enter infinite recursion calling itself.

THE DIFFERENCE BETWEEN #1 & #2 IS THE ORDER OF STATEMENTS. Not funny. Make is "designed" to make order of statements "unimportant" most of the time. Unless you spawn processes depending on values of variables. Or use := instead of =. Or mess with order of pattern-matching rules. Or... The problem is that I tried quite some permutations, and all I get is #1 or #2.

And what does make -d, the ultimate debugging facility, tell us? "Re-executing: make <args>..."

Fucking lousy masturbating piece of excrement. WHY, WHY, WHY would someone actually WRITE A NEW MAKEFILE using this "special-purpose" (but failing to complete any task useful for that purpose) language making tcsh, prolog and SQL sound like fun?? Even sed has a debugger written by some brainfuck-kind-of-hacking lover, but how does one debug THIS shit??

-- Yossi

--
The fastest way to be done with dinner is to NOT clean the kitchen.

If you don't, a mess builds up. To make dinner you have to work through
the dirty pans, cutting off the dried on spaghetti, and melting the
hardened peanut butter. But eventually you will eat dinner.

And STILL the fastest way to be done with dinner is to NOT clean the kitchen.

Reply via email to