On Sun, 2008-11-02 at 16:39 +1300, Amos Jeffries wrote:
> I'm contemplating a piece of automation to help manage the more complex 
> testbed layers.
> 
> A piece of code to recursively scan the code files and pull out the 
> unique dependency chains of nested #if...#endif.
> Reducing the entire codebase to its preprocessor code and performing 
> some of the minor actions as it goes.
> 
>  From the chain output its relatively easy to manually or otherwise 
> construct the minimal graphs of tests needed to cover all compile paths.
> 
> To work cleanly it would require a standardization of the .h safety 
> wrapper defines used in squid sources. This only applies to headers 
> bundled with squid and does not affect anything else operationally.
> 
> 
> **** Proposed wrapper define format ****
> 
> #ifndef SQUID_PATH_FILENAME_H
> #define SQUID_PATH_FILENAME_H
>    ...
> #endif /* SQUID_PATH_FILENAME_H */
> 
> so that each .h file was wrapped with a define indicating its current 
> location in the sources.
> 
> Not new, most files do this already with much variation on exact texts, 
> some do not. Just proposing it be formally adopted.

Do we want SRC in PATH? If we are moving every source file to src/ then
probably not, right?

Do we want underscores between path components? For example, 
        ADAPTATIONICAP or ADAPTATION_ICAP for src/adaptation/icap/
        FSDISKD or FS_DISKD for src/fs/diskd/

Adding underscores is more readable but I do not have a strong
preference so just pick whatever you think works best. 

I will dig out a script that fixes file preamble for all source files.
We can apply that once the layout has been fixed.

Thank you,

Alex.


Reply via email to