• Narayanan V's avatar
    WL#4380 · 72b74d58
    Narayanan V authored
    added a rule that use gcc to generate preprocessor output (gcc -E)
    that can be then compared to a already generated output using 
    the diff utility.
    
    Ran make test on the repository to verify changes.
    
    
    
    Makefile.am:
      Added a rule for checking that the abi/api has not changed.
      
      The following steps are followed in the rule in makefile.am
      
       1) Generate preprocessor output for the files that need to
          be tested for abi/api changes. use -nostdinc to prevent 
          generation of preprocessor output for system headers. This 
          results in messages in stderr saying that these headers 
          were not found. Redirect the stderr output to /dev/null 
          to prevent seeing these messages.
       2) sed the output to remove blank lines and lines that begin
          with # (The header information is retained to enable easy
          analysis of abi diffs at a later stage).
       3) diff the generated file and the canons (.pp files already in
          the repository).
       4) delete the .out file that is generated.
      
       If the diff fails, the generated file is not removed. This will
       be useful for analysis of ABI differences (e.g. using a visual
       diff tool).
      
       A ABI change that causes a build to fail will always be  
       accompanied by new canons (.out files). The .out files that
       are not removed will be replaced as the new .pp files.
      
       e.g. If include/mysql/plugin.h has an ABI change then this
       rule would leave a include/mysql/plugin.out file.
      
       A developer with a justified API change will then do a
       mv include/mysql/plugin.out include/mysql/plugin.pp to 
       replace the old canons with the new ones.
    configure.in:
      1) Removed the part of the file that was icheck related.
      
      2) Added an entry for the configure variable DIFF
    include/mysql.h.pp:
      The pre-processor output canon file for include/mysql.h
    include/mysql/plugin.h.pp:
      The pre-processor output canon file for include/mysql/plugin.h
    include/mysql_h.ic:
      since the icheck target has been removed, this file need
      no longer be present in the repository
    sql/mysql_priv.h.pp:
      The pre-processor output canon file for sql/mysql_priv.h
    72b74d58
mysql.h.pp 23.3 KB