Commit graph

352 commits

Author SHA1 Message Date
Kurtis Rader
345950ac1b workaround broken groff man page config
Fixes #2673
2016-10-19 13:43:04 -07:00
Aaron Gyes
dcb39af8c0 Fix lexicon_filter verbosity
the `mv $@.tmp $@; test -x $@ || chmod a+x $@;` bit was printing out.
2016-10-17 18:48:47 -07:00
Aaron Gyes
632a209685 Don't show all the help input files on build
It's too much!
2016-10-03 14:35:14 -07:00
Aaron Gyes
98470ab608 Something got caught in my sed net: $(b) -> $(bo)
Oops. Fixes #3394
2016-09-20 12:04:46 -07:00
Aaron Gyes
8b1625be2b Fix "libraryn" typo 2016-09-19 17:18:43 -07:00
Aaron Gyes
02ba7933e0 Fix syntax errors breaking make doc 2016-09-18 04:24:43 -07:00
Aaron Gyes
30b71fbb78 $(v)echo foo -> $v echo foo for verbosity modifier
Not sure why I crammed $(v) up like that with the parens. This is
a little sed job after regretting the Makefile seeming harder to read.
Certainly better.

We want clang or gcc picked for both C++/C

Few final cleanups - time to feed it to Travis.
2016-09-17 16:29:43 -07:00
Aaron Gyes
e14ae90cc8 mass-rename T_BLAH to cause less visual raucus
"em" is italics
"bo" is bold
sgr0 is sgr0
red  is red

.. and so on in an arbitrary manner.
2016-09-16 00:14:50 -07:00
Aaron Gyes
06c658dd5e Autotools build: teach it clang, utility macros
Teach autotools about clang++.
 - Use AC macros for these utilities in Makefile:
    LN_S, MKDIR_P, AWK, GREP, FGREP.
   This has the effect on OS X with prefixed coreutils installed
   from macports: > make show-LN_S show-MKDIR_P show-AWK show-GREP
    LN_S = 'ln -s'
    MKDIR_P = '/opt/local/bin/gmkdir -p'
    AWK = 'awk'
    GREP = '/opt/local/bin/grep'
    FGREP = '/opt/local/bin/grep -F'
 - Use GNU Make findstrings, wildcard,notdir,
 - SHELL = @SHELL@ per reccomended practice and in line with
    actual behavior.
 - Add output for string wrangling steps
2016-09-15 23:24:41 -07:00
Aaron Gyes
f0125734d0 Improve make install and make uninstall experience
Show the gist of what is going on during uninstall.

I had overlooked the uninstall target, with it mislabled as having
to do translations. Give make uninstall the full treatment here.

In addition to showing what is going on, give the user a 5^H7 second
warning before we blast away /usr/local/share/fish/ - it's not
unthinkable they might have a script or two in there.
2016-09-09 01:24:24 -07:00
Aaron Gyes
578e4e8207 Don't use colors over 8 during builds
T_DIM to only highlight the "important" CXX lines seems distracting.
Use it only for the pages of output from re-running configure
2016-09-06 04:59:37 -07:00
Aaron
b895a50bb2 Sorry. This fixes the not-quoted variables. 2016-09-01 10:35:45 -07:00
Aaron Gyes
4b740d1fb6 Fix make install 2016-09-01 10:09:29 -07:00
Aaron Gyes
e54b30d138 Fix the Travis build. 2> /dev/null omission.
The last few commits broke Travis. `tput`'s errors weren't
being tossed out, and T_WHITE was left there.
2016-09-01 09:46:02 -07:00
Aaron Gyes
4b2d1c9acf 'ZH' fallback for tput sitm, fix forced dim OS X 2016-09-01 07:38:18 -07:00
Aaron Gyes
2345bea5c1 Makefile bug fixes, tweaks
Fix problem with Makefile not escaping 'echo' correctly
Support systems where 'tput' only works with termcap names
Adjust output. Shade out most run-of-the-mill output so you can't
miss warnigns and our status signposts amonst the .o files created.
2016-09-01 07:22:25 -07:00
Aaron Gyes
816857ead2 Fix spurious "Make install to..." guidance
... during make install.
2016-08-09 06:15:51 -07:00
Aaron Gyes
1248642996 Make: improve readability for black-on-white terms 2016-08-09 06:07:52 -07:00
Aaron Gyes
a5e31cb0f1 quiet make builds: part two
* Use the Makefile mechanism to also detect old key_reader binaries
   Don't tell them to delete it - just that they might want fkr.
   You'd have to of installed it manually. Not unhelpful to point
   that out here.
 * Remind folks to start a new fish session after install
 * Add output for installation during silent builds
 * Suppress "Fish has been built, use make install..." if fish was
   actually built with a goal of `make install' from the command-line
   already and it's already working on that. It can be confusing.
 * Get rid of the $(call) stuff for color usage
   Fixes problem with gucked up output when doing parallel builds
 * Brighten up output with more colors and fancy attributes.
   Works fine with TERM=dumb
 * Introduce show-VAR targets - with VAR being a variable name,
   adding this to the target list wherever you like will cause
   the pretty-printed VAR='VAR' output. Can also use MAKE show-FOO
   to quickly diagnose problems.
 * Put the -D macros in CPPFLAGS (C preprocessor flags) as God
   intended instead of MACROS. CPPFLAGS was already defined but
   empty - and MACROS was getting added to CXXFLAGS and used on
   every CXX invocation.
 * Addresss a handful of missed bits from the initial silent make
   merge. Like msgfmt output.
 * Fix config.status output being completely silenced even when
   it's re-running ./configure.
 * Work around annoyance with PCRE being perfectly quiet except a
   minority of the rm's during make clean.
2016-08-09 05:05:15 -07:00
Aaron Gyes
d7604dcc99 Control Makefile verbosity level with V=.
Instead of using @ directly most of the time, use $(v) which can be
'' or @ controlled by V. Defaults to 0. make V=1 for a verbose make.
2016-07-31 12:25:27 -07:00
Aaron Gyes
71e1e38426 Silence the Makefile build
There was a lot of very noisy output for things
we do not care about, particularly the echoing of clang commands,
installs, and doxygen output.

We now show output like " CXX     src/fish.o" and not much else
unless there is a problem.

Add mechanism to show e.g. CXXFLAGS variables at top of build.

Improve make docs output

Highlight FISH_BUILD_VERSION

FISH_BUILD_VERSION is yellow.
Run ./configure with -q
2016-07-31 12:24:35 -07:00
Aaron Gyes
113145e52a Fix CHANGELOG.md install 2016-07-18 07:00:35 -07:00
Kurtis Rader
e00c70c5fe don't let low level tests pollute user home dir
Fixes #3228
2016-07-15 16:08:35 -07:00
David Adam
9abbc5f06c Makefile: soft-fail on creating extra directories
The extra {completions,functions,conf}.d directories may be placed
outside the writeable prefix. Attempt to create them, but don't abort
the installation if it is not possible.

(There is an argument for not creating these folders at all, but that
reduces their discoverability.)

As discussed in https://github.com/Homebrew/homebrew-core/pull/2813
2016-07-09 11:04:31 +08:00
Aaron Gyes
ceedc6f345 Run make depend! 2016-07-03 05:04:19 -07:00
David Adam
cd6a9ee522 remove obsolete install targets in Makefile
check-uninstall detects incompatible old installations of fish pre-2006;
it seems unlikely that there are still from-source installations that
will be incompatible in only this way.

install-sh works around a limitation in darcs, the previous VCS, and is
no longer required.

install-force should be refactored at some point.
2016-06-14 09:22:33 +08:00
David Adam
a5e0555e83 make style targets in Makefile phony 2016-06-14 09:22:28 +08:00
Kurtis Rader
b055b8440c enhance the key_reader program
The original `key_reader` program was useful but didn't do much that `xxd`
or `od -tx1z` didn't do. Furthermore, it wasn't built and installed by
default. This change adds features that make it superior to those programs
for decoding interactive key presses and makes it a first-class citizen
like the `fish_indent` program that is always available.

Fixes #2991
2016-05-10 14:11:30 -07:00
Kurtis Rader
aa8840b423 restyle fallback module to match project style
Reduces lint errors from 36 to 33 (-8%). Line count from 1910 to 1476 (-23%).

Another step in resolving issue #2902.

This also fixes a stupid mistake from an earlier commit where I didn't realize
that osx/config.h was meant to be included as a semi-static file in the
repository.
2016-04-30 18:20:18 -07:00
Kurtis Rader
87d5fa054d compile fallback.cpp and util.cpp seperately
Don't `#include "*.cpp"` modules in other cpp modules. I already took care
of all the builtin_*.cpp modules in my previous change where I restyled
the builtin code. This change fixes the two remaining instances of this
anti-pattern.
2016-04-27 14:56:46 -07:00
Kurtis Rader
df10b53c0c restyle builtin modules to match project style
Now that the IWYU cleanup has been merged compile all, not just a couple, of
the builtin modules independent of builtin.cpp. That is, no longer `#include
builtin_NAME.cpp` in builtin.cpp. This is more consistent, more in line with
what developers expect, and is likely to reduce mistakes.

Reduces lint errors from 384 to 336 (-13%). Line count from 6307 to 4988 (-21%).

Another step in resolving issue #2902.
2016-04-26 21:58:59 -07:00
Kurtis Rader
1f06e5f0b9 add better support for IWYU and fix things
Remove the "make iwyu" build target. Move the functionality into the
recently introduced lint.fish script. Fix a lot, but not all, of the
include-what-you-use errors. Specifically, it fixes all of the IWYU errors
on my OS X server but only removes some of them on my Ubuntu 14.04 server.

Fixes #2957
2016-04-26 15:02:22 -07:00
Aaron Gyes
0fd3f5c0dd Update to pcre2 10.21
Point build tools at 10.21
2016-04-19 11:49:12 +08:00
David Adam
e1e1e558ce pcre2: add maintainer mode and disable by default 2016-04-07 11:07:44 +08:00
David Adam
200a10e78d Rename "snippets" to "conf" internally, and document them as snippets
Discussed in #2896.
2016-04-06 09:33:09 +08:00
Kurtis Rader
fd1b7ba529 support making fish code match the style guide
This changes implements two new make targets: `style` and `style-all`. These
make it easy to ensure that a change conforms to the project style guides for
C++ and fish code.

Fixes #571
2016-04-04 21:00:43 -07:00
David Adam
484c1484c9 Customisable extra configuration, completion and function directories
- Add options to the autotools build to set the path for the "vendor"
   or "extra" configuration snippets, functions and completions
   directories.

 - Remove the vendor_completions directory from the Xcode build, as
   these are relocatable and compiling the paths in does not make sense.

This allows packaging tools like Homebrew and Nix to use a common
directory outside of the main prefix for third-party completions, and
to make these available for programmatic discovery through `pkg-config`.

Closes #2113
2016-04-04 15:58:13 -07:00
Mark Griffiths
cb6d5d76c8 update lexicon for latest docs
Closes #2699

Fixes issues with:
* 'string' function synopsis
* Redirection display issues
* Better file & path detection
* Rendering of % & @ chars in both html and man
* @ symbol in tutorial

Improves robustness by implementing an @EOL marker to prevent hold buffer dumping extra chars after the end of an expression.

Added new '{{' and '}}' meta-chars for when you want curly braces in a regexp that was previously tripping up the lexicon.

Improve man/html presentation consistency for
* string
* printf
* prompt_pwd
* type

Use cli-styling for 'practical' examples.

Add <bs> tag for presenting content with preceding backslash.

Signed-off-by: Mark Griffiths <mark@thebespokepixel.com>
2016-04-04 15:23:56 -07:00
Kurtis Rader
6fa09e6a70 add make targets to lint the code
Fixes #2818
2016-04-01 16:29:06 -07:00
Laurence McGlashan
83233ccc5a Correction to make rule for fish_version 2016-03-31 15:22:08 -07:00
Jak Wings
6888c3d604 rename make target "user_doc" to "doc"
Fixes #2875
2016-03-31 14:52:34 +08:00
Kurtis Rader
35cee1e39c remove "doc" make target and rename "user_doc"
Fixes #2874
2016-03-30 19:20:23 -07:00
Fabian Homborg
c1b384e5d3 Add functions and configuration snippets hierarchy
This allows "vendors" (i.e. third-party upstreams interested in
supporting fish) to add auto-loaded functions and eager-loaded
configuration "snippets", while still allowing both the user and the administrator to
fully override all of that.

This has been inspired by systemd's configuration hierarchy, and implements a similar scheme
whereby files with the same name in higher-ranking directories override files in lower-ranking ones.

Fixes #1956
2016-02-26 12:14:55 +01:00
Kurtis Rader
8b67a1b26f make testing on local servers hermetic
I noticed while fixing issue #2702 that the fish program being tested
was sourcing config.fish files outside of the current build. This also
happens when Travis CI runs the tests but isn't an issue there because
of how Travis is configured to execute the tests.

I also noticed that running `make test` was polluting my personal fish
history; which will become a bigger problem if and when the fishd universal
var file is moved from $XDG_CONFIG_HOME to $XDG_DATA_HOME.

This change makes it possible for an individual to run the tests on
their local machine secure in the knowledge that only the config.fish and
related files from their git repository will be used and doing so won't
pollute their personal fish history.

Resolves #469
2016-02-25 17:16:36 -08:00
David Adam
d61e95e4f9 Makefile: enable maintainer mode for PCRE2
Closes #2469.
2016-02-24 18:14:41 +08:00
Gordon Tyler
c2024a6a94 Fix key_reader make target. 2015-11-08 12:43:14 -08:00
David Adam
b7e991c4b7 Makefile: only clean PCRE2 directory if it is configured in 2015-10-15 17:18:02 +08:00
David Adam
bec6d5c174 Makefile: improve integration with pcre2 build
Work on #2446
2015-10-02 15:29:08 +08:00
David Adam
3ffbf9a7ea configure/Makefile: allow the use of a system libpcre2 if available 2015-10-01 16:33:23 +08:00
ridiculousfish
b2e8967e94 Migrate builtin_string.cpp to its own object file
This keeps the architecture a little less surprising
2015-09-21 16:41:25 -07:00