I'm supposed to modify this monster Makefile that I get very little of - I have very little experience with such things.
I've got just one more thing to do. Namely, there exists a certain #define COMMUNICATION_MODE XXX in a certain header, and I want to give XXX as a parameter to the make command (e.g, make COMMUNICATION_MODE=COMMUNICATION_DDS).
The way I figured it, I just replace the said macro declaration in the header with a @sed command in the makefile. It works fine, replace is great and all but the problem is that modifying the header doesn't trigger a recompile. I guess that the make script gets the timestamps of the file before the header is modified. For example, if I set COMMUNICATION_MODE=FOO I get something like "nothing to be done for 'all'" and next time I run make it produces errors as expected. I tried adding a @touch after @sed but it doesn't make any difference.
My question is: is there any way to force the header to be considered as modified and recompile it? Or, is there any other solution for my problem?
Thx a lot, I know there are quite a few programmers on WCR, maybe some of you knows how to do it. I don't even know what to google, and I'd probably get crucified on StackOverflow for not knowing the basics etc.
______________________________20:52 Cows-go-moo: search us east too
20:52 Cows-go-moo: like tears of americans
20:52 Cows-go-moo: when they lose
Found it, apparently you can make use of #ifdef MY_MACRO and invoke gcc -DMY_MACRO if you want it enabled.
______________________________20:52 Cows-go-moo: search us east too
20:52 Cows-go-moo: like tears of americans
20:52 Cows-go-moo: when they lose
There are currently 1 users browsing this thread. (0 members and 1 guests)