GNU make and my thoughts on it

Ugh, my most mindnumbing debug experience was porting a fat16 filesystem from one assembler to another (same core).

The filesystem was composed of about 100 files, all included into the main "filesystem.asm".

If you had a problem with scope or something, the assembler would give you completely bogus answers about where the problem lay. Nothing like getting "Scope error--assembly halted" after hitting make. After about a week of that crap, I split them into separate files.

Which led me to the next problem. The assembly language had "high level conditionals", a pseudo macro language that would expand if, while, do, etc loops into assembly.

The two brands of assembler decided to use different temporary registers in composing their loops. That was fun trying to find.

Next, the macro expansion systems were different between vendors. with a lot of ifdef <blahlbah> would evaluate to nothing, so entire blocks were being left out silently.

Ah, the joys of obscure platforms.
 
Simon F said:
Struth guys! You're worried about a measly little tab in Makefiles when there are far bigger stupidities in the programming world?

Take C for instance with its syntax for accessing data structures. If you have a pointer, you use prefix notation, i.e. *pData, but if it's an element in a referenced structure you switch to postfix pData->stuff. Nice and constistent and even more fun when you have a pointer to a pointer to a structure... or was it a pointer to a structure element that's a pointer. Joy.

well, use (*pData).stuff then ;)
frankly, at one point in my life i used to share your dislike for the '->' operator, but after a couple of kilobytes of (*(*(*pData).pOhterData).pStillOtherData).stuff code i succumbed back to the loathful '->' op :)


RussSchultz said:
Ugh, my most mindnumbing debug experience was porting a fat16 filesystem from one assembler to another (same core).

The filesystem was composed of about 100 files, all included into the main "filesystem.asm".

If you had a problem with scope or something, the assembler would give you completely bogus answers about where the problem lay. Nothing like getting "Scope error--assembly halted" after hitting make. After about a week of that crap, I split them into separate files.

Which led me to the next problem. The assembly language had "high level conditionals", a pseudo macro language that would expand if, while, do, etc loops into assembly.

The two brands of assembler decided to use different temporary registers in composing their loops. That was fun trying to find.

Next, the macro expansion systems were different between vendors. with a lot of ifdef <blahlbah> would evaluate to nothing, so entire blocks were being left out silently.

Ah, the joys of obscure platforms.

Russ, whoever used the "high level conditionals" was plain asking for it 8) last time i tried to have a bit higher-level talk with masm (about the best macro asm there used to be for the x86 at the time) the poor beast got completely lost over the correct size of one particular struct datatype (ok, it was rather complex, still nothing to excuse the sizeof op for incorectly reporting its size!) -- the real fun came from any actual declaration of that misfortunate datatype in the data segment -- that would cause the asm's offsets resolver to subsequently calculate data offsets "a bit" off the mark, and not only of that particular datatype but also of all of the data declared past the unlucky one in the data seg -- imagine the fun ;)

oh, and to try to attach some value to this post re your original problem - try out jam! ;)
 
Back
Top