[Hackage] #32: add -DPACKAGE_FOO_VERSION=1.1 to cpp command line

Hackage trac at galois.com
Tue Aug 12 18:29:39 EDT 2008

#32: add -DPACKAGE_FOO_VERSION=1.1 to cpp command line
  Reporter:  ijones         |        Owner:        
      Type:  enhancement    |       Status:  closed
  Priority:  normal         |    Milestone:  _|_   
 Component:  Cabal library  |      Version:        
  Severity:  normal         |   Resolution:  fixed 
  Keywords:                 |   Difficulty:  easy  
Ghcversion:  6.2.2          |     Platform:        
Changes (by duncan):

  * status:  new => closed
  * resolution:  => fixed


 Mon Aug 11 18:30:16 BST 2008  Simon Marlow <marlowsd at gmail.com>
   * Add auto-generated CPP macros for package version testing

   Now when using CPP you get


   for each <package> in build-depends, which is true if the version of
   <package> in use is >= A.B.C, using the normal ordering on version

   This is done by auto-generating a header file
   dist/build/autogen/cabal_macros.h, and passing a -include flag when
   running CPP.

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/32#comment:4>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list