[Developers] User compilation scripts

Arni Magnusson arnima at hafro.is
Wed Feb 16 04:29:22 PST 2011


Hi all,

I've committed (r982) a major rewrite of the user compilation scripts for 
the GCC compiler. From the user perspective, the changes are minor 
improvements:

   * Optimization level -O3 is used, but not when user passes -g, as
     -O3 makes it harder to debug

   * Build script (admb) gives verbose error message about which
     compilation step failed, or a simple 'Done'

   * No more multiple spaces in screen output

   * Scripts do not freeze if user passes unknown -option [Windows]

   * Strip and debug are supported, again [Windows]

   * CXXFLAGS and LDFLAGS are recognized [Windows]


>From the developer perspective, the main changes are:

   * All scripts are max 80 columns wide

   * Big comment header at the beginning of script removed, replaced
     with a compact revision history at end of script

   * Revision history describes specific changes to that script, as
     opposed to SVN log entries that are often too general

   * Correct Bash syntax is $((OPTIND-1)), not $[OPTIND-1], according
     to new and old Bash reference manuals

   * Single spaces (using echo instead of printf), CXXFLAGS/LDFLAGS
     (no intermediate ARG), df1b2lib (no more stub) are handled in a
     simpler way than before


I encourage developers to test these scripts, especially in Mac OS, since 
I don't have access to such a machine. Scripts for other compilers (bcc32, 
cl, icpc, ...) can be revised as well.

---

In La Jolla (March 2010), the meeting decided that user compilation 
scripts should default to safe compilation, not optimized compilation, to 
check array bounds. I suggest this change (simple, yet radical) should be 
scheduled shortly before the next ADMB release. It will probably involve a 
new user option -o to optimize, and -s will be silently ignored.

Arni


More information about the Developers mailing list