From: Adam Dunkels (adam_at_sics.se)
Date: 2001-12-11 08:45:03
groepaz, On Monday 10 December 2001 22:13, you wrote: > the problem is, that if i want to include the file (which includes > #include "../a/very/long/and/troublesome/path/file.h") from different > locations in the filesystem (for whatever reason, eg generating the > main exes in the projects root and some teststuff deep inside another > external built tree) ... this would only work with (to me) annoying > workarounds, scattering machine-dependend paths around makefiles (i > managed to not do so for a coupple of years now so why should i start > with that?) etc pp > > i _KNOW_ that existing options and features can be used to "almost" > achive what i want, and i know how to do it - i just think its > limiting me in a way it shouldnt. I guess that I am missing your point, but what do you mean with machine-dependant paths in makefiles? To me it seems quite simple to add a few paths to the makefiles and refrain from usign full pathnames in the #include directives. > i wrote that in the mail before.... you'll run into troubles when > using several files of the same name. (and yeah, i tend to do this > heavily) Having many include files with the same name is definately a problem that can lead to interesting and surprising results. Somehow, one always ends up including the wrong file... One way to fix it is to move such files into dedicated subdirectories. For instance, one usually wants to have a few "debug.h" files for controlling debugging output and such. Instead of always #including "debug.h" and hope to get the right file, I try to put these in subdirectories with descriptive names so that I can #include "proj/debug.h" and "c64/debug.h", "files/debug.h", and so on. /adam -- Adam Dunkels <adam_at_sics.se> http://www.sics.se/~adam ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:44 CET