[ 
https://issues.apache.org/jira/browse/COUCHDB-1012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086498#comment-13086498
 ] 

Noah Slater commented on COUCHDB-1012:
--------------------------------------

Okay, how about this:


Options:

  -h          display a short help message and exit
  -V          display version information and exit

Common directories:

  --bindir            user executables [EPREFIX/bin]
  --sbindir           system admin executables [EPREFIX/sbin]
  --libexecdir        program executables [EPREFIX/libexec]
  --sysconfdir        read-only single-machine data [PREFIX/etc]
  --sharedstatedir    modifiable architecture-independent data [PREFIX/com]
  --localstatedir     modifiable single-machine data [PREFIX/var]
  --libdir            object code libraries [EPREFIX/lib]
  --includedir        C header files [PREFIX/include]
  --oldincludedir     C header files for non-gcc [/usr/include]
  --datarootdir       read-only arch.-independent data root [PREFIX/share]
  --datadir           read-only architecture-independent data [DATAROOTDIR]
  --infodir           info documentation [DATAROOTDIR/info]
  --localedir         locale-dependent data [DATAROOTDIR/locale]
  --mandir            man documentation [DATAROOTDIR/man]
  --docdir            documentation root [DATAROOTDIR/doc/apache-couchdb]
  --htmldir           html documentation [DOCDIR]
  --dvidir            dvi documentation [DOCDIR]
  --pdfdir            pdf documentation [DOCDIR]
  --psdir             ps documentation [DOCDIR]

CouchDB directories:

  --localconfdir      configuration data [SYSCONFDIR/$package_identifier]
  --localdatadir      runtime data [DATADIR/$package_identifier]
  --localdocdir       documentation data [DATADIR/doc/$package_identifier]
  --locallibdir       library data [LIBDIR/$package_identifier]
  --localstatelibdir  database data [LOCALSTATEDIR/lib/$package_identifier]
  --localstatelogdir  log data [LOCALSTATEDIR/log/$package_identifier]
  --localstaterundir  daemon data [LOCALSTATEDIR/run/$package_identifier]

Note: the above has been correctly formatted for fixed width display, and 
$variables will be replaced by the script.

I think that should be enough. We list all of the default Autoconf stuff, as 
well as listing the most important variable set specifically for CouchDB. I 
don't think we should include options such as --uri-file or whatever. This 
duplicates this information, as it is only stored in one other place in the 
source, so it would quickly rot. Also, the tiny amount of space we have in the 
output of this tool is not enough to document these files. That is what the 
documentation proper is for. This is a tool to allow people already familiar 
with what they are looking for to print out values.

The -n output you suggest is not needed:

$ echo "foo `echo bar` baz"
foo bar baz

This would change your example usage of the script to this:

echo "`couch-config -locallibdir`/ebin/"



> Utility to help plugin developers manage paths
> ----------------------------------------------
>
>                 Key: COUCHDB-1012
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1012
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Build System
>            Reporter: Randall Leeds
>            Assignee: Randall Leeds
>             Fix For: 1.2
>
>         Attachments: 
> 0001-add-couch-config-file-used-to-ease-the-build-of-plug.patch, 
> 0001-add-couch-config-file-used-to-ease-the-build-of-plug.patch, 
> 0001-support-pkg-config-for-plugins-COUCHDB-1012.patch
>
>
> Developers may want to write plugins (like GeoCouch) for CouchDB. Many hooks 
> in the configuration system allow loading arbitrary Erlang modules to handle 
> various internal tasks, but currently there is no straightforward and 
> portable way for developers of these plugins to discover the location of the 
> CouchDB library files.
> Two options that have been proposed are to use pkg-config or install a 
> separate script that could be invoked (e.g. as couch-config --erl-libs) to 
> discover important CouchDB installation paths.
> As far as I know the loudest argument against pkg-config is lack of support 
> for Windows.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to