(make.info.gz) Override Directive

Info Catalog (make.info.gz) Appending (make.info.gz) Using Variables (make.info.gz) Multi-Line
 
 6.7 The `override' Directive
 ============================
 
 If a variable has been set with a command argument ( Overriding
 Variables Overriding.), then ordinary assignments in the makefile are
 ignored.  If you want to set the variable in the makefile even though
 it was set with a command argument, you can use an `override'
 directive, which is a line that looks like this:
 
      override VARIABLE = VALUE
 
 or
 
      override VARIABLE := VALUE
 
    To append more text to a variable defined on the command line, use:
 
      override VARIABLE += MORE TEXT
 
  Appending More Text to Variables Appending.
 
    Variable assignments marked with the `override' flag have a higher
 priority than all other assignments, except another `override'.
 Subsequent assignments or appends to this variable which are not marked
 `override' will be ignored.
 
    The `override' directive was not invented for escalation in the war
 between makefiles and command arguments.  It was invented so you can
 alter and add to values that the user specifies with command arguments.
 
    For example, suppose you always want the `-g' switch when you run the
 C compiler, but you would like to allow the user to specify the other
 switches with a command argument just as usual.  You could use this
 `override' directive:
 
      override CFLAGS += -g
 
    You can also use `override' directives with `define' directives.
 This is done as you might expect:
 
      override define foo =
      bar
      endef
 
  Defining Multi-Line Variables Multi-Line.
 
Info Catalog (make.info.gz) Appending (make.info.gz) Using Variables (make.info.gz) Multi-Line
automatically generated by info2html