Commit graph

180 commits

Author SHA1 Message Date
David Adam
66fd52aa15 fish_xgettext: update translation generation for new build system
Closes #6123.
2019-09-21 22:29:19 +08:00
Fabian Homborg
cc1388a78a Upgrade littlecheck to allow whitespace before comments
Necessary for test files that pass fish_indent.
2019-06-25 16:11:24 +02:00
ridiculousfish
476185748f Add littlecheck.py
This will be the new testing tool replacing the diff-based tests.

Imported from https://github.com/ridiculousfish/littlecheck
Version e28281273e54745c7d7aabeeb4b085af477d584b
2019-06-16 13:27:06 -07:00
Fabian Homborg
7ddae68645 Restyle a few stragglers
THERE WERE TABS! TABS!

TABS!

[ci skip]
2019-05-20 21:07:37 +02:00
Fabian Homborg
c2b7e9b2e6 fish_indent: Allow multiple file arguments
Allows `fish_indent -w **.fish` to restyle all fish files under the
current directory.

(This also has the sideeffect of reducing style.fish time by ~10s, as
we only need to invoke `fish_indent` once, instead of once per-file)
2019-05-20 21:04:51 +02:00
Fabian Homborg
4078a3df26 build_tools/style.fish: Stop excluding completions
[ci skip]
2019-05-05 12:54:02 +02:00
Fabian Homborg
df7cb66ff9 build_tools/style: Make output a bit spicier.
COLORS! ALL THE COLORS! Well, three! No, wait, FOUR! But only if you
count "normal" as a color!

[ci skip]
2019-05-05 12:07:38 +02:00
Fabian Homborg
2b3f48d9ee build_tools/style.fish: Use black as python formatter
(Also renames the silly "$f_files" to "$fish_files")
2019-05-05 12:07:38 +02:00
ridiculousfish
36998eee55 Make more miscellaneous globals thread safe 2019-05-04 20:58:35 -07:00
ridiculousfish
18cecd3663 Beef up find_globals
Allow it to find the source declarations for globals, and ignore const ones.
2019-05-04 20:42:48 -07:00
Lily Ballard
aafd706a34 Replace Doxygen reference in README with Sphinx
Also update a comment in the `make_tarball.sh` script.
2019-03-31 21:39:03 +08:00
David Adam
83b4adffc0 make_pkg: get static version if git is not available 2019-02-28 21:08:02 +08:00
David Adam
ba64ec6e91 lint: drop CXX argument
The "fatal error: 'stddef.h' file not found" error is caused by incomplete installation of IWYU,
which can be fixed directly.

See https://github.com/include-what-you-use/include-what-you-use/issues/100
2019-02-28 22:03:57 +11:00
David Adam
a0f785c90f build_tools/style: drop guidance to use make 2019-02-28 22:03:57 +11:00
David Adam
e9b853e0c2 make_tarball: use cmake instead of Autotools for doc generation 2019-02-28 22:03:56 +11:00
Fabian Homborg
5e98259d95 autotools: Fix lint target
This used "argparse" to parse the args, which broke since CXXFLAGS
contained options.

Instead we pass "--all" before any other arguments, and then stop
argparse at nonoptions.
2019-02-25 15:15:40 +01:00
ridiculousfish
c99fa08f21 Remove all of the documentation build helper scripts 2019-02-24 19:40:05 -08:00
David Adam
e461858964 travis: blacklist stl_tree from UBSan
Work on #2852.
2019-02-10 16:24:24 +08:00
ridiculousfish
23f8f1b6fb Remove some stale bits from make_pkg.sh 2019-02-05 22:14:43 -08:00
ridiculousfish
0f5dc0b4e2 Add --stdout param to git_version_gen.sh
This causes git_version_gen.sh to print to stdout.
2019-02-05 22:14:43 -08:00
ridiculousfish
c869ab541d Remove some additional xcode references 2019-02-05 22:14:43 -08:00
ridiculousfish
ecb808fb39 Teach make_pkg.sh to build fish.app via cmake 2019-02-05 22:14:43 -08:00
ridiculousfish
eaefed434d make_pkg.sh to build with CMake instead of Xcode 2019-02-05 22:14:43 -08:00
Fabian Homborg
eb8a93f499 lint.fish: Modernize a bit
Use argparse, variable-as-command, skip missingInclude.
2019-02-04 16:58:38 +01:00
David Adam
b60a9d8c4a pcre2: move to PCRE2 10.32
Closes #5353.
2018-12-29 22:54:40 +08:00
Mahmoud Al-Qudsi
a5b8359c1c Add script for diffing two fish profile runs
Came in handy for tracking down the performance regression in #5219. This will
take the output of two (necessarily identical) `fish --profile ...` runs and
produce a third profile log in which all times are the difference between the
first and the second profile provided.

(I'm not sure if build_tools is the right place for it, but I think it's OK?)
2018-10-14 16:45:16 -05:00
ridiculousfish
36a149337b Eliminate / vet and whitelist some more globals 2018-09-29 01:11:15 -04:00
ridiculousfish
20cb62440c Eliminate some mutable global variables
Make them const or otherwise get rid of them
2018-09-29 00:20:50 -04:00
ridiculousfish
f465760d1f Add a tool to locate global variables 2018-09-29 00:18:33 -04:00
David Adam
1e0fab4fa4 git_version_gen: add support for out-of-tree tarballs
Closes #4122.
2018-08-28 23:10:24 +08:00
Mahmoud Al-Qudsi
f741968d6d Drop hard dependency on bash from git_version_gen.sh again
I can't seem to find a reason why the shell interpreter needs to be bash
and not just sh here. Needed to replace `BASH_SOURCE[0]` with the legacy
`$0` supported by sh, but otherwise it seems to still work.

Many non-Linux platforms do not ship with bash out-of-the-box (and as a
shell, I don't think we need to encourage the further proliferation of
bash ;-), this lets fish build on a clean install of FreeBSD, which does
not have bash.
2018-06-01 12:48:03 -05:00
Wilke Schwiedop
bd24e8662e fix 'sort | uniq' 2018-04-09 01:09:49 +02:00
Samuel Gagnon
dae0dd513d Fixes the FAQ questions in the sidebar of user_doc/html/index.html 2018-03-31 12:18:37 -07:00
ridiculousfish
df4b03d859 Fix CMake documentation build path
This fixes a variety of issues related to building the documentation
with CMake. In particular it cleans up the dependency management and
fixes some issues where the documentation build was using generated
files from the source directory.
2018-03-05 12:13:34 -08:00
Fabian Homborg
b75c3b968c Replace muparser with tinyexpr 2018-03-01 13:09:35 +01:00
David Adam
0a4883a6b8 Xcode build: use the same files as the CMake build for versioning
Closes #4671.
2018-01-19 22:31:08 +08:00
raichoo
069e4fdd8d do not depend on bash being installed in /bin (#4661) 2018-01-15 15:02:08 +01:00
ridiculousfish
faa17ec849 Correct a comment in git_version_gen.sh 2018-01-08 22:29:34 -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
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
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
ridiculousfish
e2b798cda3 [muparser] Restyle muparser sources to match fish
Add muparser soruces to style.fish, and run it to make muparser
match fish style guidelines.
2017-12-18 11:58:13 -08:00
David Adam
834f344f1d build_documentation: postprocess regular expression uses command name
The previous regular expression only matched the `abbr` text and was
used in testing.
2017-12-15 09:53:15 +08:00
David Adam
69342066f4 build_documentation: reduce unnecessary copying, sed and perl
This saves about a second, which is not a lot, but dropping the build
dependency on perl is helpful.
2017-12-14 22:54:08 +08:00
David Adam
e98ecf9cfa build_lexicon_filter: drop which dependency 2017-11-30 15:00:52 +08:00
David Adam
b7fc3ee22e build_lexicon_filter: pass sed binary as command line argument
Ensures toolchain is consistent throughout; fixes documentation builds
on Homebrew.
2017-11-28 21:17:39 +08:00
David Adam
c8c129f7a5 build_lexicon_filter: remove erroneous variable brought across from Makefile 2017-11-28 21:16:26 +08:00
Michihito Shigemura
75cdaf5601 Support regex both BSD and GNU generating man pages 2017-11-26 18:19:45 -08:00
Michihito Shigemura
8e93041205 Stop outputting duplicate titles in man pages
Command name continues twice in man page.

Current version's example:

NAME
       andand - conditionally execute a command

Fixed version:

NAME
       and - conditionally execute a command
2017-11-26 18:19:45 -08:00
Mahmoud Al-Qudsi
798ad363ba Fix extra ../ in figurig out GIT_DIR in build script 2017-10-25 16:43:39 -05:00