Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

4.9 Running Arbitrary Configuration Commands

You can execute arbitrary commands before, during, and after config.status is run. The three following macros accumulate the commands to run when they are called multiple times. AC_CONFIG_COMMANDS replaces the obsolete macro AC_OUTPUT_COMMANDS; see Obsolete Macros, for details.

— Macro: AC_CONFIG_COMMANDS (tag..., [cmds], [init-cmds])

Specify additional shell commands to run at the end of config.status, and shell commands to initialize any variables from configure. Associate the commands with tag. Since typically the cmds create a file, tag should naturally be the name of that file. If needed, the directory hosting tag is created. This macro is one of the instantiating macros; see Configuration Actions.

Here is an unrealistic example:

          fubar=42
          AC_CONFIG_COMMANDS([fubar],
                             [echo this is extra $fubar, and so on.],
                             [fubar=$fubar])
     

Here is a better one:

          AC_CONFIG_COMMANDS([timestamp], [date >timestamp])
     

The following two macros look similar, but in fact they are not of the same breed: they are executed directly by configure, so you cannot use config.status to rerun them.

— Macro: AC_CONFIG_COMMANDS_PRE (cmds)

Execute the cmds right before creating config.status.

This macro presents the last opportunity to call AC_SUBST, AC_DEFINE, or AC_CONFIG_FOOS macros.

— Macro: AC_CONFIG_COMMANDS_POST (cmds)

Execute the cmds right after creating config.status.


 
 
  Published under the terms of the GNU General Public License Design by Interspire