-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[install] Allow users to specify docdir and etcdir
Fixes #4723 This is an important fix for those using Dune to build, for example, Debian packages, as docdir is there `prefix/share/doc/package`, similarly for `etc`. Thus, I request for approval to ship this in 2.9. I have written the patch very conservatively, as to allow easy backporting, but once we release 2.9 it would be convenient to refactor this code so overridable directories are placed into a record. Signed-off-by: Emilio Jesus Gallego Arias <e+git@x80.org>
- Loading branch information
Showing
12 changed files
with
104 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,7 @@ let library_path = None | |
let library_destdir = None | ||
|
||
let mandir = None | ||
|
||
let docdir = None | ||
|
||
let etcdir = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
$ echo "(lang dune 2.0)" > dune-project | ||
$ touch foo.opam docfile | ||
$ cat >dune <<EOF | ||
> (install | ||
> (section doc) | ||
> (files docfile)) | ||
> EOF | ||
$ dune build @install | ||
$ mkdir install docdir | ||
$ dune install --dry-run --prefix ./install --docdir ./docdir 2>&1 | grep docdir | ||
Removing (if it exists) docdir/foo/docfile | ||
Installing docdir/foo/docfile | ||
Creating directory docdir/foo | ||
Copying _build/install/default/doc/foo/docfile to docdir/foo/docfile (executable: false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
$ echo "(lang dune 2.0)" > dune-project | ||
$ touch foo.opam configfile | ||
$ cat >dune <<EOF | ||
> (install | ||
> (section etc) | ||
> (files configfile)) | ||
> EOF | ||
$ dune build @install | ||
$ mkdir install etcdir | ||
$ dune install --dry-run --prefix ./install --etcdir ./etcdir 2>&1 | grep etcdir | ||
Removing (if it exists) etcdir/foo/configfile | ||
Installing etcdir/foo/configfile | ||
Creating directory etcdir/foo | ||
Copying _build/install/default/etc/foo/configfile to etcdir/foo/configfile (executable: false) |