GenPKG moves the configuration for GHC's package system from a dedicated
package description file into the Makefile. GenPKG takes command line
arguments corresponding to the entries in a package description and prints
the package description to the standard output.

Usage: GenPKG packagename [flags]

The flags correspond to the entries of a package file. Each flag applies to
the following non-flag words (zero or more) on the argument list and flags
may occur repeatedly.

--auto
	default value is False. Words must be either True or False with later
	words overriding earlier ones.
--import_dirs
	all argument words are collected
--source_dirs
	all argument words are collected
--library_dirs
	all argument words are collected
--hs_libraries
	all argument words are collected
--extra_libraries
	all argument words are collected
--include_dirs
	all argument words are collected
--c_includes
	all argument words are collected
--package_deps
	all argument words are collected
--extra_ghc_opts
	all argument words are collected
--extra_ld_opts
	all argument words are collected

Example use:

[taken from a Makefile]

GenPKG $(PACKAGE) --import_dirs $(IMPORTDIR) --source_dirs $(TARGETDIR) \
      --library_dirs $(TARGETDIR) --hs_libraries DBCONNECT --extra_libraries pq \
      --package_deps haskell98 c2hs --extra_ld_opts $(EXTRA_LD_OPTS) \
      | ghc-pkg --config-file $(PACKAGECONFIG) --update-package --auto-ghci-libs
