Commit graph

36 commits

Author SHA1 Message Date
David Adam
f36a391f26 fish.desktop: install .desktop and icon 2020-01-25 16:48:57 +08:00
David Adam
8ff0c351a9 vendor_*.d: also create these directories in the prefix 2020-01-25 16:12:20 +08:00
David Adam
81306d3b30 vendor_*.d: include /usr/local by default as "extra" directory
Closes #5029.
2020-01-25 16:12:20 +08:00
Johannes Altmanninger
e3782603ec Load vendor configuration from $XDG_DATA_DIRS/vendor_*.d
$XDG_DATA_DIRS/vendor_{completions,conf,functions}.d
Additionally, CMake variables extra_{completions,conf,functions}dir are
appended, if they are not already contained in $XDG_DATA_DIRS.

If XDG_DATA_DIRS is not defined, we fall back to

$__fish_datadir/vendor_completions.d:${extra_completionsdir}

for completions. Same for conf and functions.
2020-01-12 16:12:41 +01:00
David Adam
a10547018e cmake: don't install realpath manpage on non-macOS systems 2019-09-17 20:54:11 +08:00
Fabian Homborg
cdbd0891f7 Remove invocation tests
These are now all performed by littlecheck, so there's no need for the
entire target anymore.
2019-06-25 22:31:45 +02:00
Fabian Homborg
bfb61879cd Do create installation directories that already exist
Reverts 71329a250b.

That tried to fix problems with pkgconfig by not recreating it.
Instead, use the function we already have for not trying too hard to
create a directory.

Fixes #5735.
2019-03-12 18:50:45 +01:00
David Adam
9acfe0261b cmake: install system manpath manpages
The build path of these files moved under Sphinx.
2019-02-28 22:03:57 +11:00
Fabian Homborg
3674efad0b Fix manpage directory
This installed files in man/ directly, instead of in man/man1/, so
they weren't installed.

See #5696.
2019-02-25 21:16:42 +01:00
David Adam
4f3786f8d0 Build system: add extra sysconf directories
Closes #5235.
2018-11-04 21:14:06 +08:00
Mahmoud Al-Qudsi
e26d5418af Revert "Blow away existing $fish_data_dir on (re)install"
This reverts commit e35983438e.
Reopens #4314. Closes #5007.

# Conflicts:
#	share/config.fish
2018-05-31 22:41:49 -05:00
Mahmoud Al-Qudsi
e35983438e Blow away existing $fish_data_dir on (re)install
Fixes #4314 (under cmake, at least)
2018-04-14 21:01:52 -05:00
David Adam
0572b29f26 [cmake] install manual from binary directory
Fixes out-of-tree builds.
2018-03-24 22:38:38 +08:00
David Adam
b819f38e83 [cmake] fix selection of manual pages for installation 2018-03-24 22:38:38 +08:00
David Adam
a6d2b06529 [cmake] use full paths for extra configuration/function/completion dirs 2018-03-24 22:38:38 +08:00
David Adam
625ef5d734 [cmake] fix generation of fish pkgconfig file
Use `printf` instead of the non-portable `echo -n`.
2018-03-24 22:38:38 +08:00
David Adam
b5aea3fd8b Revert "[cmake] Fix installing docs"
INSTALL_DOCS is not a controllable option, and is only used to indicate
whether they will be installed or not.

This reverts commit e800b18ee9.
2018-03-13 22:08:05 +08:00
Fabian Homborg
e800b18ee9 [cmake] Fix installing docs
Installing docs is not optional if they have been built
2018-03-13 12:55:05 +01:00
Mahmoud Al-Qudsi
71329a250b [cmake] Don't create installation directories that already exist
fish's cmake install routines were attempting to create system
directories that already existed, an operation for which the permissions
to do so may not be available (e.g. /usr/local/share/pkgconfig)

This commit first checks if a directory exists before creating it.
2018-03-04 15:46:29 -06:00
David Adam
2747945c55 [cmake] don't try too hard to create extra vendor directories
Homebrew and other systems set the path for the extra completion,
function and configuration directories outside the writeable prefix.

Mirror the autotools build in trying to create these directories, but
not causing the whole install to fail if this operation in unsuccessful.
2018-02-27 20:42:58 +08:00
Mahmoud Al-Qudsi
1b27c97bfb [cmake] Fix dependency path for FBVF for fish.pc rule
The custom command for fish.pc had a dependency on FBVF, but it appears
that the relative path to FBVF was incorrect and with CMake 3.10.1 under
FreeBSD this was consistently causing the build to fail if
../build_tools/git_version_gen.sh hadn't (coincidentally, I think?)
already run.

Explicitly set the dependency path for FBVF to the binary directory.
2018-02-21 13:58:56 -06:00
Mahmoud Al-Qudsi
9e1576bdc4 Revert "[cmake] Add rule to generate FBVF"
This reverts commit e4c59ac60a.

I hadn't seen the FBVF rule in the `Version` CMake file. There's
something else going on here.
2018-02-21 13:50:05 -06:00
Mahmoud Al-Qudsi
e4c59ac60a [cmake] Add rule to generate FBVF
The custom command for fish.pc had a dependency on FBVF, but there was
no cmake rule for the generation of the FBVF file. With CMake 3.10.1
under FreeBSD, this was consistently causing the build to fail if
../build_tools/git_version_gen.sh hadn't (coincidentally, I think?)
already run.
2018-02-21 13:40:15 -06:00
Mahmoud Al-Qudsi
462b9c2209 Fix broken fish.pc build on non-GNU platforms
`-v` is a non-standard GNU-only extension to `awk`, its usage in the
generation of the fish.pc script breaks on non-GNU platforms (such as
FreeBSD and presumably macOS).

Using `sed` with only standard posix commands instead.
2018-01-23 22:07:04 -06:00
David Adam
020fe5ccdf [cmake] fix installation of translations 2018-01-22 14:30:36 +08:00
David Adam
164108d0a9 [cmake] mark manual as an optional component for install 2018-01-21 20:37:29 +08:00
David Adam
9c7909c006 [cmake] install manual and changelog 2018-01-21 15:28:03 +08:00
David Adam
1231d358de [cmake] remove duplicate installation 2018-01-21 07:51:26 +08:00
David Adam
8eb0608b00 [cmake] make build_lexicon_filter part of DocTargets only 2018-01-14 21:14:22 +08:00
ridiculousfish
d09210c08b [cmake] Untangle the CMake versioning
This untangles the CMake versioning issues (I hope) as discussed in #4626.
Note most of the advice found on the Internet about how to inject git
versions into CMake is just wrong.

The behavior we want is to unconditionally run the script
build_tools/git_version_gen.sh at build time (i.e. when you invoke ninja or
make, and not when you invoke cmake, which is build system generation time).
This script is careful to only update the FISH-BUILD-VERSION-FILE if the
contents have changed, to avoid spurious rebuilding dependencies of
FISH-BUILD-VERSION-FILE. Assuming the git version hasn't changed, the script
will run, but not update FISH-BUILD-VERSION-FILE, and therefore
fish_version.o will not have to be rebuilt.

This might normally rebuild more than is necessary even if the timestamp is
not updated, because ninja computes the dependency chain ahead of time. But
Ninja also supports the 'restat' option for just this case, and CMake is rad
and exposes this via BYPRODUCTS. So mark FISH-BUILD-VERSION-FILE as a
byproduct and make the script always update a dummy file
(fish-build-version-witness.txt). Note this is the use case for which
BYPRODUCTS is designed.

We also have fish_version.cpp #include "FISH-BUILD-VERSION-FILE", and do a
semi-silly thing and make FISH-BUILD-VERSION-FILE valid C++ (so there's just
one version file). This means we have to filter out the quotes in other
cases..
2018-01-08 22:28:10 -08:00
ridiculousfish
21cfdf04bd Revert "[cmake] Remove build_fish_pc target"
This reverts commit 585321181d.

With the build_fish_pc target, a command like this fails:
  env DESTDIR=/tmp/fish-install ninja install
2018-01-08 22:28:10 -08:00
ridiculousfish
da8db7f6f0 Revert "Generate FISH_BUILD_VERSION info for cmake builds"
This reverts commit 25839b8c36.

This was an attempt to simplify the version generation, but it
computed the version at build sytem generation time rather than
at build time, requiring another run of CMake to update it.
2018-01-08 22:28:10 -08:00
Fabian Homborg
585321181d [cmake] Remove build_fish_pc target
The dependency on fish.pc just does not work.

This still installs the pc file with the proper version, so it should work.
2018-01-01 13:02:39 +01:00
Mahmoud Al-Qudsi
25839b8c36 Generate FISH_BUILD_VERSION info for cmake builds
Correctly generate FISH_BUILD_VERSION for use in fish_version.h/cpp and
fish.pc to allow `fish --version` and `echo $version` to work again.

Not needing the same convoluted measures used by Makefile builds to
prevent the regeneration of the fish version file when it hasn't
changed.

Purposely created a new `cmake_git_version_gen.sh` file so that the old
`git_version_gen.sh` remains compatible with the existing Makefile build
script. Same reason why `fish.pc.in` was not modified to use a lowercase
variable name to match the CMAKE variable of the same name.

Closes #4626
2017-12-30 17:38:09 -06:00
Mahmoud Al-Qudsi
87f7cd0370 Fix make install failure on missing man pages
If `doxygen` isn't installed, the man files aren't built and that's
quite ok. The cmake `install` target was presuming the man files would
always be present and the install stage was failing if they weren't
built.
2017-12-28 15:22:31 -06:00
David Adam
396faebc08 Move CMakeFiles to cmake
Makes in-tree (ie `cmake .`) builds work.
2017-11-17 16:21:55 +08:00
Renamed from CMakeFiles/Install.cmake (Browse further)