Skip to content

Commit

Permalink
Document --gen-pkg-config directory case.
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
  • Loading branch information
ezyang committed Apr 8, 2016
1 parent ae22e2d commit 18c9043
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cabal/Distribution/Simple/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ registerCommand = CommandUI
trueArg

,option "" ["gen-pkg-config"]
"instead of registering, generate a package registration file"
"instead of registering, generate a package registration file/directory"
regGenPkgConf (\v flags -> flags { regGenPkgConf = v })
(optArg' "PKG" Flag flagToList)

Expand Down
5 changes: 4 additions & 1 deletion Cabal/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
* Dropped support for versions of GHC earlier than 6.12 (#3111).
* Convenience/internal libraries are now supported (#269).
An internal library is declared using the stanza "library
'libname'".
'libname'". Packages which use internal libraries can
result in multiple registrations; thus '--gen-pkg-config'
can now output a directory of registration scripts rather than
a single file.
* Backwards incompatible change to preprocessor interface:
the function in 'PPSuffixHandler' now takes an additional
'ComponentLocalBuildInfo' specifying the build information
Expand Down
8 changes: 7 additions & 1 deletion Cabal/doc/installing-packages.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,8 @@ This command takes the following options:

`--gen-pkg-config`[=_path_]
: Instead of registering the package, generate a package registration
file. This only applies to compilers that support package
file (or directory, in some circumstances).
This only applies to compilers that support package
registration files which at the moment is only GHC. The file should
be used with the compiler's mechanism for registering packages. This
option is mainly intended for packaging systems. If possible use the
Expand All @@ -1170,6 +1171,11 @@ This command takes the following options:
generate. Otherwise, by default the file is the package name and
version with a `.conf` extension.

This option outputs a directory if the package requires multiple
registrations: this can occur if internal/convenience libraries
are used. These configuration file names are sorted so that they
can be registered in order.

`--inplace`
: Registers the package for use directly from the build tree, without
needing to install it. This can be useful for testing: there's no
Expand Down

0 comments on commit 18c9043

Please sign in to comment.