Need for %ctop{ %}

From: Dmitri Toubelis <dmitri.toubelis_at_alkeron.com>
Date: Thu, 30 Dec 2010 12:12:19 -0500 (EST)

Hi,

I'm new to this list but I was using GOB with autotools for several years now. GOB is a excellent tool and it is saved us a lot of time. However, all this time I was having intermittent problems with our builds. I was fixing these problems by adding temporary hacks to a standard autotool's build process. Finally I had some time to investigate them properly and here is my observations:

- We use autotools to generate config.h file that needs to be included as a first thing in *.c files.

- I would normally put it at the top of %{ %} section but then I was having problems and in particular with large file support that didn't work on GOB generated files and worked flawlessly on manually created ones.

- It appears that top of %{ %} section does not translate to the top of corresponding *.c file and GOB includes its headers before this point when it is too late for config.h.

- To prove my suspicion I tried to include config.h in %alltop{ %} section and it worked alright. However, config.h should not be used in any of headers especially in public ones and it have to only be included just once at the top in each of *.c files.

So, does anyone came across same problem before? If so, are there any reasonable workarounds out there? Otherwise, can we talk about adding this feature to GOB?

Regards,
Dmitri
Received on Thu Dec 30 2010 - 11:13:55 CST

This archive was generated by hypermail 2.2.0 : Sun Apr 17 2011 - 21:05:02 CDT