← Back to team overview

dolfin team mailing list archive

Re: Fwd: [Branch ~dolfin-core/dolfin/trunk] Rev 7051: Move installation of dolfin.conf from $prefix/share/dolfin to $prefix/etc

 

You may be right. It's a config file for how to build against DOLFIN,
not for configuring DOLFIN.

Another motivation to put it there is I want Dorsal to generate a
corresponding fenics.conf file and I want to put both files in the
same location. Where is otherwise a suitable location for fenics.conf?

I would like to accomplish the following:

1. Being able to use Dorsal to build everything except DOLFIN (by
   commenting out DOLFIN in the platform file).

2. Being able to build DOLFIN against that installation by sourcing
   a single file

   source <dorsal_install>/<etc or some other dir>/fenics.conf

3. Being able to build and run DOLFIN applications against (1) and (2)
   by sourcing two files:

   source <dorsal_install>/<etc or some other dir>/fenics.conf
   source <dolfin_install>/<etc or some other dir>/dolfin.conf

4. A user who lets Dorsal build the whole stack including DOLFIN
   should be able to build and run applications against that
   installation by just sourcing one file:

   source <dorsal_install>/<etc or some other dir>/fenics.conf

And I want both files to be generated automatically, not having to
maintain my own fenics.conf files. I typically have multiple
installations of the FEniCS stack except for DOLFIN and a handwritten
fenics.conf for each that I source before building multiple DOLFIN
versions against those.

--
Anders


On Tue, Oct 30, 2012 at 09:45:38PM +0000, Garth N. Wells wrote:
>    dolfin.conf is helper file, not a config file. Seems wrong to me to put
>    it in etc.
>
>    Garth
>    ---------- Forwarded message ----------
>    From:
>    Date: Tuesday, 30 October 2012
>    Subject: [Branch ~dolfin-core/dolfin/trunk] Rev 7051: Move installation
>    of dolfin.conf from $prefix/share/dolfin to $prefix/etc
>    To: Garth Wells <[1]gnw20@xxxxxxxxx>
>    ------------------------------------------------------------
>    revno: 7051
>    committer: Anders Logg <logg@glaurung>
>    branch nick: trunk-logg
>    timestamp: Tue 2012-10-30 12:42:01 -0700
>    message:
>    Â  Move installation of dolfin.conf from $prefix/share/dolfin to
>    $prefix/etc
>    Â  since it is a config file. Want to generate a corresponding
>    fenics.conf
>    Â  in the same directory when new Dorsal build is fully functional.
>    modified:
>    Â  CMakeLists.txt
>    Â  cmake/post-install/CMakeLists.txt
>
>
> Referenser
>
>    1. mailto:gnw20@xxxxxxxxx
>    2. https://code.launchpad.net/~dolfin-core/dolfin/trunk
>    3. https://code.launchpad.net/~dolfin-core/dolfin/trunk/+edit-subscription
>    4. http://www.eng.cam.ac.uk/~gnw20

> === modified file 'CMakeLists.txt'
> --- CMakeLists.txt	2012-10-29 11:35:54 +0000
> +++ CMakeLists.txt	2012-10-30 19:42:01 +0000
> @@ -574,6 +574,7 @@
>  set(DOLFIN_SHARE_DIR "share/dolfin" CACHE PATH "Shared data installation directory.")
>  set(DOLFIN_MAN_DIR "share/man" CACHE PATH "Manual page installation directory.")
>  set(DOLFIN_DOC_DIR "${DOLFIN_SHARE_DIR}/doc" CACHE PATH "DOLFIN Documentation directory.")
> +set(DOLFIN_ETC_DIR "etc" CACHE PATH "Configuration file directory.")
>
>  # Add source directory
>  add_subdirectory(dolfin)
> @@ -614,7 +615,7 @@
>  configure_file(${DOLFIN_CMAKE_DIR}/templates/dolfin.conf.in
>                 ${CMAKE_BINARY_DIR}/dolfin.conf @ONLY)
>  install(FILES ${CMAKE_BINARY_DIR}/dolfin.conf
> -        DESTINATION ${DOLFIN_SHARE_DIR}
> +        DESTINATION ${DOLFIN_ETC_DIR}
>          COMPONENT Development)
>
>  #------------------------------------------------------------------------------
>
> === modified file 'cmake/post-install/CMakeLists.txt'
> --- cmake/post-install/CMakeLists.txt	2011-06-21 14:47:41 +0000
> +++ cmake/post-install/CMakeLists.txt	2012-10-30 19:42:01 +0000
> @@ -15,7 +15,7 @@
>
>  To update your environment variables, run the following command:
>
> -    source ${CMAKE_INSTALL_PREFIX}/${DOLFIN_SHARE_DIR}/dolfin.conf
> +    source ${CMAKE_INSTALL_PREFIX}/${DOLFIN_ETC_DIR}/dolfin.conf
>
>  For future reference, we recommend that you add this command to your
>  configuration (.bashrc, .profile or similar).
>

> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help   : https://help.launchpad.net/ListHelp



Follow ups

References