2006-10-31 12:06:56 +10:00
# Copyright (C) 2005-2006 Axel Liljencrantz
2005-09-20 23:26:39 +10:00
#
2006-11-02 00:47:47 +10:00
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
2005-09-20 23:26:39 +10:00
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
2013-12-13 21:51:52 +01:00
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
2005-09-20 23:26:39 +10:00
#
2006-02-04 23:09:14 +10:00
#
# @configure_input@
#
2005-09-20 23:26:39 +10:00
#
# Makefile for the fish shell. Can build fish and associated
2013-11-30 15:11:05 +08:00
# applications, install them, and recalculate dependencies.
2005-09-20 23:26:39 +10:00
#
2010-11-22 19:05:06 +08:00
# Used by docdir
PACKAGE_TARNAME = @PACKAGE_TARNAME@
2006-10-31 12:06:56 +10:00
#
2006-01-23 21:38:07 +10:00
# Programs
2006-10-31 12:06:56 +10:00
#
2012-01-06 11:29:03 -08:00
CXX := @CXX@
2006-01-23 21:38:07 +10:00
INSTALL := @INSTALL@
2014-09-18 20:29:49 +08:00
SED := @SED@
2006-01-23 21:38:07 +10:00
2006-10-31 12:06:56 +10:00
#
2006-01-23 07:35:48 +10:00
# Installation directories
2006-10-31 12:06:56 +10:00
#
2005-09-20 23:26:39 +10:00
prefix = @prefix@
exec_prefix = @exec_prefix@
2010-11-22 19:05:06 +08:00
datarootdir = @datarootdir@
2006-01-04 22:51:02 +10:00
datadir = @datadir@
2005-09-20 23:26:39 +10:00
bindir = @bindir@
mandir = @mandir@
sysconfdir = @sysconfdir@
docdir = @docdir@
2006-07-20 00:41:04 +10:00
localedir = @localedir@
2006-10-31 12:06:56 +10:00
#
# Various flags
#
2006-07-20 00:41:04 +10:00
2013-10-29 00:01:21 +08:00
MACROS = -DLOCALEDIR= \" $( localedir) \" -DPREFIX= L\" $( prefix) \" -DDATADIR= L\" $( datadir) \" -DSYSCONFDIR= L\" $( sysconfdir) \" -DBINDIR= L\" $( bindir) \" -DDOCDIR= L\" $( docdir) \"
2012-01-06 10:23:38 -08:00
CXXFLAGS = @CXXFLAGS@ $( MACROS) $( EXTRA_CXXFLAGS)
2014-03-29 23:28:11 +08:00
CPPFLAGS = @CPPFLAGS@
2013-11-09 19:43:32 +08:00
LDFLAGS = @LDFLAGS@
2014-03-29 23:28:11 +08:00
LIBS = @LIBS@
LDFLAGS_FISH = ${ LDFLAGS } @LDFLAGS_FISH@
2006-10-31 12:06:56 +10:00
#
2006-01-23 07:35:48 +10:00
# Set to 1 if we have gettext
2006-10-31 12:06:56 +10:00
#
2006-01-04 22:51:02 +10:00
HAVE_GETTEXT = @HAVE_GETTEXT@
2013-06-19 23:59:13 +08:00
#
# Set to 1 if we have doxygen
#
HAVE_DOXYGEN = @HAVE_DOXYGEN@
2006-10-31 12:06:56 +10:00
#
2012-01-06 10:23:38 -08:00
#Additional .cpp files used by common.o. These also have a corresponding
2006-06-13 23:43:28 +10:00
#.h file.
2006-10-31 12:06:56 +10:00
#
2012-02-09 19:26:44 -08:00
COMMON_FILES := util.cpp fallback.cpp
2006-02-10 01:50:20 +10:00
2006-10-31 12:06:56 +10:00
#
2008-01-13 05:21:35 +10:00
# All objects that the system needs to build fish, except fish.o
2006-10-31 12:06:56 +10:00
#
FISH_OBJS := function .o builtin.o complete.o env.o exec.o expand.o \
highlight.o history.o kill.o parser.o proc.o reader.o sanity.o \
tokenizer.o wildcard.o wgetopt.o wutil.o input.o output.o intern.o \
2014-06-18 10:14:35 -07:00
env_universal_common.o input_common.o event.o \
2012-01-25 00:36:55 -08:00
signal.o io.o parse_util.o common.o screen.o path.o autoload.o \
2012-12-08 21:41:38 -08:00
parser_keywords.o iothread.o color.o postfork.o \
2014-05-02 10:31:04 +02:00
builtin_test.o parse_tree.o parse_productions.o parse_execution.o \
2014-09-21 19:18:56 -07:00
pager.o utf8.o fish_version.o wcstringutil.o
2005-09-20 23:26:39 +10:00
2014-12-23 15:29:42 -08:00
FISH_INDENT_OBJS := fish_indent.o print_help.o $( FISH_OBJS)
2006-10-31 12:06:56 +10:00
#
2006-06-13 23:43:28 +10:00
# Additional files used by builtin.o
2006-10-31 12:06:56 +10:00
#
2012-01-06 10:23:38 -08:00
BUILTIN_FILES := builtin_set.cpp builtin_commandline.cpp \
2013-01-22 18:07:28 +01:00
builtin_ulimit.cpp builtin_complete.cpp builtin_jobs.cpp \
builtin_set_color.cpp builtin_printf.cpp
2006-01-23 07:35:48 +10:00
2006-10-31 12:06:56 +10:00
#
2006-01-23 07:35:48 +10:00
# All objects that the system needs to build fish_tests
2006-10-31 12:06:56 +10:00
#
2006-07-15 22:39:03 +10:00
FISH_TESTS_OBJS := $( FISH_OBJS) fish_tests.o
2006-01-23 07:35:48 +10:00
2006-10-31 12:06:56 +10:00
2005-09-20 23:26:39 +10:00
#
2006-11-20 11:06:20 +10:00
# Files containing user documentation
2005-09-20 23:26:39 +10:00
#
2006-10-31 12:06:56 +10:00
2006-11-23 04:53:33 +10:00
#
# These files are the source files, they contain a few @FOO@-style substitutions
2013-10-05 00:37:44 -07:00
# Note that this order defines the order that they appear in the documentation
2006-11-23 04:53:33 +10:00
#
2013-10-05 00:37:44 -07:00
HDR_FILES_SRC := doc_src/index.hdr.in doc_src/tutorial.hdr doc_src/design.hdr doc_src/license.hdr doc_src/commands.hdr.in doc_src/faq.hdr
2006-11-23 04:53:33 +10:00
#
# These are the generated result files
#
2013-03-30 12:21:49 -07:00
HDR_FILES := $( HDR_FILES_SRC:.hdr.in= .hdr)
2006-10-31 12:06:56 +10:00
2012-01-06 10:23:38 -08:00
# Use a pattern rule so that Make knows to only issue one invocation
# per http://www.gnu.org/software/make/manual/make.html#Pattern-Intro
2012-06-01 14:00:04 -07:00
2012-01-06 10:23:38 -08:00
2005-09-20 23:26:39 +10:00
#
2010-09-18 10:18:26 +08:00
# Files containing documentation for external commands.
2005-09-20 23:26:39 +10:00
#
2006-10-31 12:06:56 +10:00
2006-11-23 04:53:33 +10:00
HELP_SRC := $( wildcard doc_src/*.txt)
2005-09-20 23:26:39 +10:00
2014-08-01 03:37:32 +01:00
#
# HTML includes needed for HTML help
#
HTML_SRC := doc_src/user_doc.header.html doc_src/user_doc.footer.html doc_src/user_doc.css
2006-10-31 12:06:56 +10:00
2006-01-23 07:35:48 +10:00
#
# Files in the test directory
#
2006-10-31 12:06:56 +10:00
2005-09-20 23:26:39 +10:00
TEST_IN := $( wildcard tests/test*.in)
2006-10-31 12:06:56 +10:00
#
2006-03-29 10:25:00 +10:00
# Files in ./share/completions/
2006-10-31 12:06:56 +10:00
#
2013-10-28 09:57:36 +08:00
COMPLETIONS_DIR_FILES := $( wildcard share/completions/*.fish) share/completions/..fish
2005-09-20 23:26:39 +10:00
2006-10-31 12:06:56 +10:00
#
2006-03-29 10:25:00 +10:00
# Files in ./share/functions/
2006-10-31 12:06:56 +10:00
#
2006-02-17 20:13:39 +10:00
FUNCTIONS_DIR_FILES := $( wildcard share/functions/*.fish)
2006-02-08 19:20:05 +10:00
2006-10-31 12:06:56 +10:00
#
# Programs to install
#
2015-07-19 21:04:24 +08:00
PROGRAMS := fish fish_indent
2006-10-31 12:06:56 +10:00
#
2006-11-23 04:53:33 +10:00
# Manual pages to install
2006-10-31 12:06:56 +10:00
#
2013-01-03 15:17:48 -08:00
MANUALS := $( addsuffix .1, $( addprefix share/man/man1/, \
2013-03-30 00:13:44 -07:00
$( PROGRAMS) ) )
2005-09-20 23:26:39 +10:00
2006-10-31 12:06:56 +10:00
#
# All translation message catalogs
#
2006-01-04 22:51:02 +10:00
TRANSLATIONS_SRC := $( wildcard po/*.po)
2014-11-17 17:27:25 +08:00
i f d e f H A V E _ G E T T E X T
TRANSLATIONS := $( TRANSLATIONS_SRC:.po= .gmo)
e l s e
TRANSLATIONS :=
e n d i f
2006-01-04 22:51:02 +10:00
2013-06-19 23:59:13 +08:00
#
# If Doxygen is not available, don't attempt to build the documentation
#
i f e q ( $( HAVE_DOXYGEN ) , 1 )
user_doc = user_doc
2013-09-02 13:05:55 +08:00
share_man = share/man
2013-06-19 23:59:13 +08:00
e l s e
user_doc =
2013-09-02 13:05:55 +08:00
share_man =
2013-06-19 23:59:13 +08:00
e n d i f
2006-10-31 12:06:56 +10:00
#
# Make everything needed for installing fish
#
2014-10-01 22:02:55 +08:00
all : $( PROGRAMS ) $( user_doc ) $( share_man ) $( TRANSLATIONS ) fish .pc
2010-09-18 10:18:26 +08:00
@echo fish has now been built.
2006-11-30 00:20:04 +10:00
@echo Use \' $( MAKE) install\' to install fish.
2006-01-24 06:40:14 +10:00
.PHONY : all
2005-09-20 23:26:39 +10:00
2013-06-24 18:12:09 +08:00
#
# Pull version information
#
FISH-BUILD-VERSION-FILE : FORCE
@./build_tools/git_version_gen.sh
- i n c l u d e F I S H - B U I L D - V E R S I O N - F I L E
CPPFLAGS += -DFISH_BUILD_VERSION= \" $( FISH_BUILD_VERSION) \"
.PHONY : FORCE
2014-05-01 09:46:27 +02:00
fish_version.o : FISH -BUILD -VERSION -FILE
2013-06-24 18:12:09 +08:00
2006-10-31 12:06:56 +10:00
#
# These dependencies make sure that autoconf and configure are run
# when the source code for the build configuration has changed.
#
2006-04-02 21:15:25 +10:00
configure : configure .ac
./config.status --recheck
Makefile : Makefile .in configure
./config.status
2006-10-31 12:06:56 +10:00
#
# Build fish with some debug flags specified. This is GCC specific,
# and should only be used when debuging fish.
#
2006-08-09 21:35:54 +10:00
2012-07-08 15:20:39 -07:00
prof : EXTRA_CXXFLAGS += -pg
prof : LDFLAGS += -pg
prof : all
2010-10-05 02:23:18 +08:00
.PHONY : prof
2006-10-31 12:06:56 +10:00
#
2005-09-20 23:26:39 +10:00
# User documentation, describing the features of the fish shell.
2006-10-31 12:06:56 +10:00
#
2010-09-18 10:18:26 +08:00
# Depend on the sources (*.hdr.in) and manually make the
2007-03-24 21:08:01 +10:00
# intermediate *.hdr and doc.h files if needed
2013-09-30 16:03:34 -07:00
# The sed command deletes everything including and after the first -, for simpler version numbers
2014-08-01 03:37:32 +01:00
# Cleans up the user_doc/html directory once Doxygen is done.
2006-11-18 02:24:38 +10:00
2014-08-08 03:44:37 +01:00
user_doc : $( HDR_FILES_SRC ) Doxyfile .user $( HTML_SRC ) $( HELP_SRC ) doc .h $( HDR_FILES ) lexicon_filter
( cat Doxyfile.user; echo INPUT_FILTER = ./lexicon_filter; \
2014-09-18 20:29:49 +08:00
echo PROJECT_NUMBER = $( FISH_BUILD_VERSION) | $( SED) "s/-.*//" ) | doxygen - && touch user_doc; \
2014-09-08 06:54:03 +01:00
cd user_doc/html && rm -f bc_s.png bdwn.png closed.png ftv2*.png nav*.png open.png sync_*.png tab*.* doxygen.* dynsections.js jquery.js pages.html
2006-10-31 12:06:56 +10:00
#
2006-01-24 06:40:14 +10:00
# Source code documentation. Also includes user documentation.
2006-10-31 12:06:56 +10:00
#
2014-08-08 03:44:37 +01:00
doc : *.h *.cpp doc .h Doxyfile lexicon_filter
( cat Doxyfile; echo INPUT_FILTER = ./lexicon_filter; echo PROJECT_NUMBER = $( FISH_BUILD_VERSION) ) | doxygen - ;
2005-09-20 23:26:39 +10:00
2006-10-31 12:06:56 +10:00
#
2005-09-20 23:26:39 +10:00
# PDF version of the source code documentation.
2006-10-31 12:06:56 +10:00
#
2010-09-18 10:18:26 +08:00
doc/refman.pdf : doc
2014-09-08 06:54:03 +01:00
cd doc/latex && \
make && \
2010-09-18 10:18:26 +08:00
mv refman.pdf ..;
2005-09-20 23:26:39 +10:00
rm -r doc/latex;
2006-10-31 12:06:56 +10:00
#
# This target runs both the low level code tests and the high level script tests.
#
2014-09-23 16:29:36 -07:00
test : test_low_level test_high_level
2006-01-24 06:40:14 +10:00
.PHONY : test
2005-09-20 23:26:39 +10:00
2014-09-23 16:29:36 -07:00
# We want the various tests to run serially so their output doesn't mix
# We can do that by adding ordering dependencies based on what goals are being used.
test_goals := test_low_level test_fishscript test_interactive
# The following variables define targets that depend on the tests. If any more targets
# are added that depend, directly or indirectly, on tests, they need to be recorded here.
test_test_deps = test_low_level $( test_high_level_test_deps)
test_high_level_test_deps = test_fishscript test_interactive
active_test_goals = $( filter $( test_goals) ,$( foreach a,$( or $( MAKECMDGOALS) ,$( .DEFAULT_GOAL) ) ,$( a) $( $( a) _test_deps) ) )
filter_up_to = $( eval b:= 1) $( foreach a,$( 2) ,$( and $( b) ,$( if $( subst $( 1) ,,$( a) ) ,$( a) ,$( eval b:= ) ) ) )
test_low_level : fish_tests $( call filter_up_to ,test_low_level ,$ ( active_test_goals ) )
2014-09-04 22:26:10 -07:00
./fish_tests
.PHONY : test_low_level
2014-09-23 16:29:36 -07:00
test_high_level : test_fishscript test_interactive
.PHONY : test_high_level
2014-10-27 19:42:19 -07:00
test_fishscript : $( PROGRAMS ) $( call filter_up_to ,test_fishscript ,$ ( active_test_goals ) )
cd tests && ../fish test.fish
2014-09-04 22:26:10 -07:00
.PHONY : test_fishscript
2014-10-27 19:42:19 -07:00
test_interactive : $( PROGRAMS ) $( call filter_up_to ,test_interactive ,$ ( active_test_goals ) )
cd tests && ../fish interactive.fish
2014-09-23 16:29:36 -07:00
.PHONY : test_interactive
2006-11-01 01:36:14 +10:00
#
# commands.hdr collects documentation on all commands, functions and
# builtins
#
2006-11-23 04:53:33 +10:00
doc_src/commands.hdr : $( HELP_SRC ) doc_src /commands .hdr .in
2013-10-05 00:37:44 -07:00
-rm command_list.tmp command_list_toc.tmp $@
2006-11-23 04:53:33 +10:00
for i in ` printf "%s\n" $( HELP_SRC) | sort` ; do \
echo "<hr>" >>command_list.tmp; \
cat $$ i >>command_list.tmp; \
echo >>command_list.tmp; \
echo >>command_list.tmp; \
2013-10-05 00:37:44 -07:00
NAME = ` basename $$ i .txt` ; \
echo '- <a href="#' $$ NAME'">' $$ NAME'</a>' >> command_list_toc.tmp; \
2006-11-23 04:53:33 +10:00
echo "Back to <a href='index.html#toc-commands'>index</a>" . >>command_list.tmp; \
2010-09-18 10:18:26 +08:00
done
2006-11-23 04:53:33 +10:00
mv command_list.tmp command_list.txt
2013-10-05 00:37:44 -07:00
mv command_list_toc.tmp command_list_toc.txt
cat $@ .in | awk '{if ($$0 ~ /@command_list_toc@/) { system("cat command_list_toc.txt"); } else if ($$0 ~ /@command_list@/){ system("cat command_list.txt");} else{ print $$0;}}' >$@
2006-11-23 04:53:33 +10:00
2013-03-30 12:21:49 -07:00
toc.txt : $( HDR_FILES :index .hdr =index .hdr .in )
2006-11-23 04:53:33 +10:00
-rm toc.tmp $@
2013-10-05 00:37:44 -07:00
# Ugly hack to set the toc initial title for the main page
echo '- <a href="index.html" id="toc-index">Documentation</a>' > toc.tmp
# The first sed command captures the page name, followed by the description
# The second sed command captures the command name \1 and the description \2, but only up to a dash
# This is to reduce the size of the TOC in the command listing on the main page
2013-03-30 12:21:49 -07:00
for i in $( HDR_FILES:index.hdr= index.hdr.in) ; do \
2006-11-23 04:53:33 +10:00
NAME = ` basename $$ i .hdr` ; \
NAME = ` basename $$ NAME .hdr.in` ; \
2014-09-18 20:29:49 +08:00
$( SED) <$$ i >>toc.tmp -n \
2012-12-18 22:30:28 +08:00
-e 's,.*\\page *\([^ ]*\) *\(.*\)$$,- <a href="' $$ NAME'.html" id="toc-' $$ NAME'">\2</a>,p' \
2013-10-05 00:37:44 -07:00
-e 's,.*\\section *\([^ ]*\) *\([^-]*\)\(.*\)$$, - <a href="' $$ NAME'.html#\1">\2</a>,p' ; \
2006-11-23 04:53:33 +10:00
done
mv toc.tmp $@
doc_src/index.hdr : toc .txt doc_src /index .hdr .in
cat $@ .in | awk '{if ($$0 ~ /@toc@/){ system("cat toc.txt");} else{ print $$0;}}' >$@
2006-11-01 01:36:14 +10:00
2014-08-01 03:37:32 +01:00
#
# To enable the lexicon filter, we first need to be aware of what fish
# considers to be a command, function, or external binary. We use
# command_list_toc.txt for the base commands. Scan the share/functions
# directory for other functions, some of which are mentioned in the docs, and
# use /share/completions to find a good selection of binaries. Additionally,
# colour defaults from __fish_config_interactive to set the docs colours when
# used in a 'cli' style context.
#
lexicon.txt : doc_src /commands .hdr $( FUNCTIONS_DIR_FILES ) $( COMPLETIONS_DIR_FILES ) share /functions /__fish_config_interactive .fish
-rm lexicon.tmp lexicon_catalog.tmp lexicon_catalog.txt $@
# Scan sources for commands/functions/binaries/colours. If GNU sed was portable, this could be much smarter.
2014-09-18 20:29:49 +08:00
$( SED) <command_list_toc.txt >>lexicon.tmp -n \
2014-08-01 03:37:32 +01:00
-e "s|^.*>\([a-z][a-z_]*\)</a>|'\1'|w lexicon_catalog.tmp" \
2014-08-27 00:30:08 +01:00
-e "s|'\(.*\)'|bltn \1|p" ; mv lexicon_catalog.tmp lexicon_catalog.txt; \
2014-09-18 20:29:49 +08:00
printf "%s\n" $( COMPLETIONS_DIR_FILES) | $( SED) -n \
-e "s|[^ ]*/\([a-z][a-z_-]*\).fish|'\1'|p" | fgrep -vx -f lexicon_catalog.txt | $( SED) >>lexicon.tmp -n \
2014-08-01 03:37:32 +01:00
-e 'w lexicon_catalog.tmp' \
2014-08-27 00:30:08 +01:00
-e "s|'\(.*\)'|cmnd \1|p" ; cat lexicon_catalog.tmp >> lexicon_catalog.txt; \
2014-09-18 20:29:49 +08:00
printf "%s\n" $( FUNCTIONS_DIR_FILES) | $( SED) -n \
-e "s|[^ ]*/\([a-z][a-z_-]*\).fish|'\1'|p" | fgrep -vx -f lexicon_catalog.txt | $( SED) >>lexicon.tmp -n \
2014-08-01 03:37:32 +01:00
-e 'w lexicon_catalog.tmp' \
-e "s|'\(.*\)'|func \1|p" ; \
2014-09-18 20:29:49 +08:00
$( SED) <share/functions/__fish_config_interactive.fish >>lexicon.tmp -n \
2014-08-01 13:25:41 +01:00
-e '/set_default/s/.*\(fish_[a-z][a-z_]*\).*$$/clrv \1/p' ; \
2014-09-18 20:29:49 +08:00
$( SED) <lexicon_filter.in >>lexicon.tmp -n \
2014-09-04 10:54:18 +01:00
-e '/^#.!#/s/^#.!# \(.... [a-z][a-z_]*\)/\1/p' ; \
2014-08-01 03:37:32 +01:00
mv lexicon.tmp lexicon.txt; rm -f lexicon_catalog.tmp lexicon_catalog.txt;
#
# Compile Doxygen Input Filter from the lexicon. This is an executable sed
# script as Doxygen opens it via popen()(3) Input (doc.h) is piped through and
# matching words inside /fish../endfish blocks are marked up, contextually,
# with custom Doxygen commands in the form of @word_type{content}. These are
# trapped by ALIASES in the various Doxyfiles, allowing the content to be
# transformed depending on output type (HTML, man page, developer docs). In
# HTML, a style context can be applied through the /fish{style} block and
# providing suitable CSS in user_doc.css.in
#
2014-08-08 03:44:37 +01:00
lexicon_filter : lexicon .txt lexicon_filter .in
2014-08-01 03:37:32 +01:00
-rm $@ .tmp $@
2014-09-18 20:29:49 +08:00
# Set the shebang as sed can reside in multiple places.
$( SED) <$@ .in >$@ .tmp -e 's|@sed@|' $( SED) '|'
2014-08-03 02:25:47 +01:00
# Scan through the lexicon, transforming each line to something useful to Doxygen.
2014-09-18 20:29:49 +08:00
if echo x | $( SED) "/[[:<:]]x/d" 2>/dev/null; then \
2014-08-08 03:44:37 +01:00
WORDBL = '[[:<:]]' ; WORDBR = '[[:>:]]' ; \
2014-09-08 06:54:03 +01:00
else \
2014-10-01 18:02:01 -07:00
WORDBL = '\\<' ; WORDBR = '\\>' ; \
2014-08-08 03:44:37 +01:00
fi ; \
2014-09-18 20:29:49 +08:00
$( SED) <lexicon.txt >>$@ .tmp -n \
2014-08-08 03:44:37 +01:00
-e " s|^\([a-z][a-z][a-z][a-z]\) \([a-z_-]*\) $$ |s, $$ WORDBL\2 $$ WORDBR,@\1{\2},g|p " \
2014-08-02 04:51:43 +01:00
-e '$$G;s/.*\n/b tidy/p' ; \
2014-08-01 03:37:32 +01:00
mv $@ .tmp $@ ; if test -x $@ ; then true; else chmod a+x $@ ; fi
2006-11-01 01:36:14 +10:00
2006-10-31 12:06:56 +10:00
#
2005-09-20 23:26:39 +10:00
# doc.h is a compilation of the various snipptes of text used both for
# the user documentation and for internal help functions into a single
2014-08-01 03:37:32 +01:00
# file that can be parsed by Doxygen to generate the user
2005-09-20 23:26:39 +10:00
# documentation.
2006-10-31 12:06:56 +10:00
#
2006-11-23 04:53:33 +10:00
doc.h : $( HDR_FILES )
cat $( HDR_FILES) >$@
2006-10-31 12:06:56 +10:00
#
2005-09-20 23:26:39 +10:00
# This rule creates complete doxygen headers from each of the various
# snipptes of text used both for the user documentation and for
# internal help functions, that can be parsed to Doxygen to generate
# the internal help function text.
2006-10-31 12:06:56 +10:00
#
2005-09-20 23:26:39 +10:00
%.doxygen : %.txt
2010-09-18 10:18:26 +08:00
echo "/** \page " ` basename $* ` >$@ ;
cat $* .txt >>$@ ;
2005-09-20 23:26:39 +10:00
echo "*/" >>$@
2014-10-06 19:02:43 -07:00
# Depend on Makefile because I don't see a better way of rebuilding
# if any of the paths change.
% : %.in Makefile FISH -BUILD -VERSION -FILE
$( SED) <$< >$@ \
2006-11-11 20:53:14 +10:00
-e " s,@sysconfdir\@, $( sysconfdir) ,g " \
-e " s,@datadir\@, $( datadir) ,g " \
-e " s,@docdir\@, $( docdir) ,g " \
-e " s|@configure_input\@| $@ , generated from $@ .in by the Makefile. DO NOT MANUALLY EDIT THIS FILE!|g " \
-e " s,@prefix\@, $( prefix) ,g " \
2014-10-01 22:02:55 +08:00
-e " s,@fish_build_version\@, $( FISH_BUILD_VERSION) ,g " \
2006-07-19 02:41:55 +10:00
2006-10-31 12:06:56 +10:00
#
# Compile translation files to binary format
#
2006-01-24 03:47:42 +10:00
%.gmo :
2014-11-17 17:27:25 +08:00
msgfmt -o $@ $* .po
2006-10-31 12:06:56 +10:00
#
2006-01-04 22:51:02 +10:00
# Update existing po file or copy messages.pot
2006-10-31 12:06:56 +10:00
#
2006-01-24 03:47:42 +10:00
%.po : messages .pot
2014-11-17 17:27:25 +08:00
if test -f $* .po; then \
msgmerge -U --backup= existing $* .po messages.pot; \
else \
cp messages.pot $* .po; \
2006-01-04 22:51:02 +10:00
fi
2006-10-31 12:06:56 +10:00
#
2006-01-04 22:51:02 +10:00
# Create a template translation object
2006-10-31 12:06:56 +10:00
#
2013-01-12 15:18:19 -08:00
messages.pot : *.cpp *.h share /completions /*.fish share /functions /*.fish
2014-11-17 17:27:25 +08:00
xgettext -k_ -kN_ *.cpp *.h -o messages.pot
xgettext -j -k_ -kN_ -k--description -LShell --from-code= UTF-8 share/completions/*.fish share/functions/*.fish -o messages.pot
2006-01-04 22:51:02 +10:00
2006-06-13 23:43:28 +10:00
builtin.o : $( BUILTIN_FILES )
common.o : $( COMMON_FILES )
2006-10-31 12:06:56 +10:00
#
2005-09-20 23:26:39 +10:00
# Generate the internal help functions by making doxygen create
2006-11-18 02:24:38 +10:00
# man-pages. The convertion path looks like this:
2005-09-20 23:26:39 +10:00
#
# .txt file
# ||
# (make)
# ||
# \/
# .doxygen file
# ||
# (doxygen)
# ||
# \/
2006-11-18 02:24:38 +10:00
# roff file
2005-09-20 23:26:39 +10:00
# ||
2006-11-18 02:24:38 +10:00
# (__fish_print_help)
2005-09-20 23:26:39 +10:00
# ||
# \/
2010-09-18 10:18:26 +08:00
# formated text
# with escape
2005-09-20 23:26:39 +10:00
# sequences
#
2006-11-18 02:24:38 +10:00
#
# There ought to be something simpler.
2006-10-31 12:06:56 +10:00
#
2005-09-20 23:26:39 +10:00
2014-08-08 03:44:37 +01:00
share/man : $( HELP_SRC ) lexicon_filter
2006-11-23 04:53:33 +10:00
-mkdir share/man
touch share/man
2013-01-06 14:03:29 -08:00
-rm -Rf share/man/man1
2014-09-18 20:29:49 +08:00
PROJECT_NUMBER = ` echo $( FISH_BUILD_VERSION) | $( SED) "s/-.*//" ` INPUT_FILTER = ./lexicon_filter \
2014-08-03 02:25:47 +01:00
./build_tools/build_documentation.sh Doxyfile.help ./doc_src ./share
2006-06-13 23:43:28 +10:00
2006-01-24 06:40:14 +10:00
#
2006-02-24 01:35:56 +10:00
# The build rules for installing/uninstalling fish
#
2006-10-31 12:06:56 +10:00
#
2006-02-24 01:35:56 +10:00
# Check for an incompatible installed fish version, and fail with an
# error if found
2006-10-31 12:06:56 +10:00
#
2006-02-24 01:35:56 +10:00
check-uninstall :
if test -f $( DESTDIR) $( sysconfdir) /fish.d/fish_function.fish -o -f $( DESTDIR) $( sysconfdir) /fish.d/fish_complete.fish; then \
echo; \
echo ERROR; \
echo; \
echo An older fish installation using an incompatible filesystem hierarchy was detected; \
2006-10-26 02:35:32 +10:00
echo You must uninstall this fish version before proceeding; \
2006-11-30 00:20:04 +10:00
echo type \' $( MAKE) uninstall-legacy\' to uninstall these files,; \
echo or type \' $( MAKE) force-install\' to force installation.; \
2006-02-24 01:35:56 +10:00
echo The latter may result in a broken installation.; \
echo; \
false; \
fi ;
2006-10-26 02:35:32 +10:00
if test -f $( DESTDIR) $( sysconfdir) /fish; then \
echo; \
echo ERROR; \
echo; \
echo An older fish installation using an incompatible filesystem hierarchy was detected; \
echo You must remove the file $( DESTDIR) $( sysconfdir) /fish before proceeding; \
2006-11-30 00:20:04 +10:00
echo type \' $( MAKE) uninstall-legacy\' to uninstall this file,; \
2006-10-26 02:35:32 +10:00
echo or remove it manually using \' rm $( DESTDIR) $( sysconfdir) /fish\' .; \
echo; \
false; \
fi ;
2006-02-24 01:35:56 +10:00
.PHONY : check -uninstall
2013-04-12 13:46:27 -07:00
check-legacy-binaries :
@SEQLOC= $( prefix) /bin/seq; \
if test -f " $$ SEQLOC " && grep -q '\(^#!/.*/fish\|^#!/usr/bin/env fish\)' " $$ SEQLOC " ; then \
echo "An outdated seq from a previous fish install was found. You should remove it with:" ; \
echo " rm ' $$ SEQLOC' " ; \
fi ;
@SETCOLOR_LOC= $( prefix) /bin/set_color; \
2013-02-15 15:38:08 -08:00
if test -x " $$ SETCOLOR_LOC " && $$ SETCOLOR_LOC -v 2>& 1 >/dev/null | grep -q "^set_color, version " ; then \
2013-04-12 13:46:27 -07:00
echo "An outdated set_color from a previous fish install was found. You should remove it with:" ; \
echo " rm ' $$ SETCOLOR_LOC' " ; \
fi ;
2015-07-24 15:56:21 +08:00
@MIMEDB_LOC= $( prefix) /bin/mimedb; \
if test -x " $$ MIMEDB_LOC " && $$ MIMEDB_LOC --version 2>& 1 | grep -q "^mimedb, version " ; then \
2015-07-25 16:52:19 +08:00
echo "An outdated mimedb binary from a previous fish install was found. You should remove it with:" ; \
2015-07-24 15:56:21 +08:00
echo " rm ' $$ MIMEDB_LOC' " ; \
fi ;
@FISHD_LOC= $( prefix) /bin/fishd; \
if test -x " $$ FISHD_LOC " && $$ FISHD_LOC --version 2>& 1 | grep -q "^fishd: fishd, version " ; then \
2015-07-25 16:52:19 +08:00
echo "An outdated fishd binary from a previous fish install was found. You should remove it with:" ; \
2015-07-24 15:56:21 +08:00
echo " rm ' $$ FISHD_LOC' " ; \
fi ;
2013-04-12 13:46:27 -07:00
@true;
.PHONY : check -legacy -binaries
2013-01-12 15:18:19 -08:00
2006-10-31 12:06:56 +10:00
#
# This check makes sure that the install-sh script is executable. The
# darcs repo doesn't preserve the executable bit, so this needs to be
# run after checkout.
#
2006-07-31 07:05:06 +10:00
install-sh :
2007-02-09 03:26:58 +10:00
if test -x $@ ; then true; else chmod 755 $@ ; fi
2006-07-31 07:05:06 +10:00
.PHONY : install -sh
2006-10-31 12:06:56 +10:00
#
# Try to install after checking for incompatible installed versions.
#
2013-04-12 13:46:27 -07:00
install : all install -sh check -uninstall install -force check -legacy -binaries
2006-02-24 01:35:56 +10:00
.PHONY : install
2006-01-24 06:40:14 +10:00
2012-12-01 20:05:35 -08:00
#
# Xcode install
#
xcode-install :
rm -Rf /tmp/fish_build; \
xcodebuild install DSTROOT = /tmp/fish_build; \
ditto /tmp/fish_build /
.PHONY : xcode -install
2006-10-31 12:06:56 +10:00
#
2006-02-24 01:35:56 +10:00
# Force installation, even in presense of incompatible previous
2006-10-31 12:06:56 +10:00
# version. This may fail.
2012-02-09 16:36:35 -08:00
# These 'true' lines are to prevent installs from failing for (e.g.) missing man pages.
2006-10-31 12:06:56 +10:00
#
2006-02-24 01:35:56 +10:00
install-force : all install -translations
2010-09-18 10:18:26 +08:00
$( INSTALL) -m 755 -d $( DESTDIR) $( bindir)
2005-09-20 23:26:39 +10:00
for i in $( PROGRAMS) ; do \
$( INSTALL) -m 755 $$ i $( DESTDIR) $( bindir) ; \
2012-02-09 16:36:35 -08:00
true ; \
2005-09-20 23:26:39 +10:00
done ;
2006-10-19 21:50:23 +10:00
$( INSTALL) -m 755 -d $( DESTDIR) $( sysconfdir) /fish
2006-02-17 20:13:39 +10:00
$( INSTALL) -m 755 -d $( DESTDIR) $( datadir) /fish
$( INSTALL) -m 755 -d $( DESTDIR) $( datadir) /fish/completions
2014-10-01 07:01:24 +08:00
$( INSTALL) -m 755 -d $( DESTDIR) $( datadir) /fish/vendor_completions.d
2006-02-17 20:13:39 +10:00
$( INSTALL) -m 755 -d $( DESTDIR) $( datadir) /fish/functions
2012-06-12 09:22:45 +02:00
$( INSTALL) -m 755 -d $( DESTDIR) $( datadir) /fish/man/man1
2012-03-25 18:38:33 -07:00
$( INSTALL) -m 755 -d $( DESTDIR) $( datadir) /fish/tools
$( INSTALL) -m 755 -d $( DESTDIR) $( datadir) /fish/tools/web_config
2014-01-04 10:32:33 +05:30
$( INSTALL) -m 755 -d $( DESTDIR) $( datadir) /fish/tools/web_config/js
$( INSTALL) -m 755 -d $( DESTDIR) $( datadir) /fish/tools/web_config/partials
2012-09-06 01:40:15 -07:00
$( INSTALL) -m 755 -d $( DESTDIR) $( datadir) /fish/tools/web_config/sample_prompts
2006-10-19 21:50:23 +10:00
$( INSTALL) -m 644 etc/config.fish $( DESTDIR) $( sysconfdir) /fish/
$( INSTALL) -m 644 share/config.fish $( DESTDIR) $( datadir) /fish/
2014-10-01 22:02:55 +08:00
$( INSTALL) -m 755 -d $( DESTDIR) $( datadir) /pkgconfig
$( INSTALL) -m 644 fish.pc $( DESTDIR) $( datadir) /pkgconfig
2012-11-21 13:42:30 -08:00
for i in $( COMPLETIONS_DIR_FILES:%= '%' ) ; do \
2006-02-17 20:13:39 +10:00
$( INSTALL) -m 644 $$ i $( DESTDIR) $( datadir) /fish/completions/; \
2012-02-09 16:36:35 -08:00
true; \
2005-09-20 23:26:39 +10:00
done ;
2012-11-21 13:42:30 -08:00
for i in $( FUNCTIONS_DIR_FILES:%= '%' ) ; do \
2006-02-17 20:13:39 +10:00
$( INSTALL) -m 644 $$ i $( DESTDIR) $( datadir) /fish/functions/; \
2012-02-09 16:36:35 -08:00
true; \
2006-02-08 19:20:05 +10:00
done ;
2013-01-03 15:17:48 -08:00
for i in share/man/man1/*.1; do \
2012-06-12 09:22:45 +02:00
$( INSTALL) -m 644 $$ i $( DESTDIR) $( datadir) /fish/man/man1/; \
2012-02-09 16:36:35 -08:00
true; \
2006-11-18 02:24:38 +10:00
done ;
2012-03-25 18:38:33 -07:00
for i in share/tools/*.py; do \
$( INSTALL) -m 755 $$ i $( DESTDIR) $( datadir) /fish/tools/; \
true; \
done ;
for i in share/tools/web_config/*; do \
$( INSTALL) -m 644 $$ i $( DESTDIR) $( datadir) /fish/tools/web_config/; \
true; \
done ;
2014-01-04 10:32:33 +05:30
for i in share/tools/web_config/js/*; do \
$( INSTALL) -m 644 $$ i $( DESTDIR) $( datadir) /fish/tools/web_config/js/; \
true; \
done ;
for i in share/tools/web_config/partials/*; do \
$( INSTALL) -m 644 $$ i $( DESTDIR) $( datadir) /fish/tools/web_config/partials/; \
true; \
done ;
2012-09-06 01:40:15 -07:00
for i in share/tools/web_config/sample_prompts/*.fish; do \
$( INSTALL) -m 644 $$ i $( DESTDIR) $( datadir) /fish/tools/web_config/sample_prompts/; \
true; \
done ;
2012-03-25 18:38:33 -07:00
for i in share/tools/web_config/*.py; do \
$( INSTALL) -m 755 $$ i $( DESTDIR) $( datadir) /fish/tools/web_config/; \
true; \
done ;
2005-09-20 23:26:39 +10:00
$( INSTALL) -m 755 -d $( DESTDIR) $( docdir)
for i in user_doc/html/* ChangeLog; do \
2005-12-09 12:49:23 +10:00
if test -f $$ i; then \
$( INSTALL) -m 644 $$ i $( DESTDIR) $( docdir) ; \
fi ; \
2005-09-20 23:26:39 +10:00
done ;
$( INSTALL) -m 755 -d $( DESTDIR) $( mandir) /man1
for i in $( MANUALS) ; do \
$( INSTALL) -m 644 $$ i $( DESTDIR) $( mandir) /man1/; \
2012-02-09 16:36:35 -08:00
true; \
2005-09-20 23:26:39 +10:00
done ;
2010-09-18 10:18:26 +08:00
@echo fish is now installed on your system.
2006-01-18 23:11:43 +10:00
@echo To run fish, type \' fish\' in your terminal.
@echo
2014-09-27 19:11:30 +08:00
@if type chsh >/dev/null 2>& 1; then \
2013-08-13 17:07:24 +03:00
echo To use fish as your login shell:; \
grep -q -- " $( DESTDIR) $( bindir) /fish " /etc/shells || echo \* add the line \' $( DESTDIR) $( bindir) /fish\' to the file \' /etc/shells\' .; \
echo \* use the command \' chsh -s $( DESTDIR) $( bindir) /fish\' .; \
2013-08-13 17:13:18 +03:00
echo; \
2013-08-13 17:07:24 +03:00
fi ;
2014-09-27 19:11:30 +08:00
@if type chcon >/dev/null 2>& 1; then \
echo If you have SELinux enabled, you may need to manually update the security policy:; \
echo \* use the command \' chcon -t shell_exec_t $( DESTDIR) $( bindir) /fish\' .; \
echo; \
fi ;
2012-05-17 19:37:03 -07:00
@echo To set your colors, run \' fish_config\'
@echo To scan your man pages for completions, run \' fish_update_completions\'
2012-09-19 13:21:49 +05:30
@echo To autocomplete command suggestions press Ctrl + F or right arrow key.
2012-05-17 19:37:03 -07:00
@echo
2006-01-18 23:11:43 +10:00
@echo Have fun!
2006-04-21 01:00:28 +10:00
.PHONY : install -force
2006-02-24 01:35:56 +10:00
2006-10-31 12:06:56 +10:00
#
2006-02-24 01:35:56 +10:00
# Uninstall this fish version
2006-10-31 12:06:56 +10:00
#
2005-09-20 23:26:39 +10:00
2006-01-04 22:51:02 +10:00
uninstall : uninstall -translations
2006-10-26 02:35:32 +10:00
-for i in $( PROGRAMS) ; do \
2005-09-20 23:26:39 +10:00
rm -f $( DESTDIR) $( bindir) /$$ i; \
done ;
2012-07-08 15:20:39 -07:00
-rm -rf $( DESTDIR) $( sysconfdir) /fish
2006-10-26 02:35:32 +10:00
-if test -d $( DESTDIR) $( datadir) /fish; then \
2006-02-24 01:35:56 +10:00
rm -r $( DESTDIR) $( datadir) /fish; \
fi
2006-10-26 02:35:32 +10:00
-if test -d $( DESTDIR) $( docdir) ; then \
2012-07-08 15:20:39 -07:00
rm -rf $( DESTDIR) $( docdir) ; \
2006-02-24 01:35:56 +10:00
fi
2014-11-23 14:41:22 +08:00
-if test -f $( DESTDIR) $( datadir) /pkgconfig/fish.pc; then \
rm -f $( DESTDIR) $( datadir) /pkgconfig/fish.pc; \
fi
2006-10-26 02:35:32 +10:00
-for i in $( MANUALS) ; do \
2012-07-08 15:20:39 -07:00
rm -rf $( DESTDIR) $( mandir) /man1/` basename $$ i` *; \
2005-09-20 23:26:39 +10:00
done ;
2006-01-24 06:40:14 +10:00
.PHONY : uninstall
2005-09-20 23:26:39 +10:00
2006-10-31 12:06:56 +10:00
#
# Uninstall an older fish release. This is not the default uninstall
2006-02-24 01:35:56 +10:00
# since there is a slight chance that it removes a file put in place by
2006-10-31 12:06:56 +10:00
# the sysadmin. But if 'make install' detects a file confligt, it
# suggests using this target.
#
2006-02-24 01:35:56 +10:00
uninstall-legacy : uninstall
2006-10-26 02:35:32 +10:00
-rm -f $( DESTDIR) $( sysconfdir) /fish.d/fish_interactive.fish
-rm -f $( DESTDIR) $( sysconfdir) /fish.d/fish_complete.fish
-rm -f $( DESTDIR) $( sysconfdir) /fish.d/fish_function.fish
2007-10-14 21:52:59 +10:00
-rm -f $( DESTDIR) $( sysconfdir) /fish/fish_inputrc
2006-10-26 02:35:32 +10:00
-if test -d $( DESTDIR) $( sysconfdir) /fish.d/completions; then \
2006-02-24 01:35:56 +10:00
for i in $( COMPLETIONS_DIR_FILES) ; do \
basename = ` basename $$ i` ; \
if test -f $( DESTDIR) $( sysconfdir) /fish.d/completions/$$ basename; then \
rm $( DESTDIR) $( sysconfdir) /fish.d/completions/$$ basename; \
fi ; \
done ; \
fi ;
2006-10-26 02:35:32 +10:00
-rmdir $( DESTDIR) $( sysconfdir) /fish.d/completions
-rmdir $( DESTDIR) $( sysconfdir) /fish.d
-rm $( DESTDIR) $( sysconfdir) /fish
2010-09-18 10:18:26 +08:00
@echo The previous fish installation has been removed.
2006-04-21 01:00:28 +10:00
.PHONY : uninstall -legacy
2006-02-24 01:35:56 +10:00
2006-01-04 23:52:30 +10:00
install-translations : $( TRANSLATIONS )
2014-11-17 17:27:25 +08:00
i f d e f H A V E _ G E T T E X T
for i in $( TRANSLATIONS) ; do \
$( INSTALL) -m 755 -d $( DESTDIR) $( localedir) /` basename $$ i .gmo` /LC_MESSAGES; \
$( INSTALL) -m 644 $$ i $( DESTDIR) $( localedir) /` basename $$ i .gmo` /LC_MESSAGES/fish.mo; \
echo $( DESTDIR) $( localedir) /` basename $$ i .gmo` /LC_MESSAGES/fish.mo; \
done
e n d i f
2006-01-24 06:40:14 +10:00
.PHONY : install -translations
2006-01-04 22:51:02 +10:00
2010-09-18 10:18:26 +08:00
uninstall-translations :
2014-11-17 17:27:25 +08:00
rm -f $( DESTDIR) $( localedir) /*/LC_MESSAGES/fish.mo
2006-01-24 06:40:14 +10:00
.PHONY : uninstall -translations
2006-10-31 12:06:56 +10:00
2006-01-24 06:40:14 +10:00
#
# The build rules for all the commands
#
2006-01-04 22:51:02 +10:00
2006-10-31 12:06:56 +10:00
#
# Build the fish program.
#
2010-09-18 10:18:26 +08:00
fish : $( FISH_OBJS ) fish .o
2014-03-29 23:28:11 +08:00
$( CXX) $( CXXFLAGS) $( LDFLAGS_FISH) $( FISH_OBJS) fish.o $( LIBS) -o $@
2005-09-20 23:26:39 +10:00
2006-10-31 12:06:56 +10:00
#
# Build the fish_tests program.
#
2005-09-20 23:26:39 +10:00
fish_tests : $( FISH_TESTS_OBJS )
2014-03-29 23:28:11 +08:00
$( CXX) $( CXXFLAGS) $( LDFLAGS_FISH) $( FISH_TESTS_OBJS) $( LIBS) -o $@
2005-09-20 23:26:39 +10:00
2006-10-31 12:06:56 +10:00
2007-04-22 20:03:12 +10:00
#
# Build the fish_indent program.
#
fish_indent : $( FISH_INDENT_OBJS )
2014-03-29 23:28:11 +08:00
$( CXX) $( CXXFLAGS) $( LDFLAGS) $( FISH_INDENT_OBJS) $( LIBS) -o $@
2007-04-22 20:03:12 +10:00
2006-10-31 12:06:56 +10:00
#
2006-01-24 06:40:14 +10:00
# Neat little program to show output from terminal
2006-10-31 12:06:56 +10:00
#
2014-07-14 09:06:40 +08:00
key_reader : $( FISH_OBJS ) key_reader .o
$( CXX) $( CXXFLAGS) $( LDFLAGS_FISH) $^ $( LIBS) -o $@
2005-09-23 06:16:52 +10:00
2006-10-31 12:06:56 +10:00
2006-01-24 06:40:14 +10:00
#
# Update dependencies
#
2005-09-20 23:26:39 +10:00
depend :
2012-01-06 10:23:38 -08:00
makedepend -fMakefile.in -Y *.cpp
2006-04-02 21:15:25 +10:00
./config.status
2006-01-24 06:40:14 +10:00
.PHONY : depend
2005-09-20 23:26:39 +10:00
2006-01-24 06:40:14 +10:00
#
# Cleanup targets
#
2005-09-20 23:26:39 +10:00
2006-11-01 01:36:14 +10:00
#
# distclean should restore the tree to the state right after extracting a tarball.
#
2005-11-04 03:03:48 +10:00
distclean : clean
rm -f config.status config.log config.h Makefile
2006-01-24 06:40:14 +10:00
.PHONY : distclean
2005-11-04 03:03:48 +10:00
2006-11-01 01:36:14 +10:00
#
# clean removes everything built by the makefile, but not things that
# are created by the configure script.
#
2012-07-09 19:41:51 -07:00
# Don't delete the docs unless we have Doxygen installed
# We provide pre-built docs in the tarball, and if they get
# deleted we won't be able to regenerate them
2005-09-20 23:26:39 +10:00
clean :
2012-01-06 10:23:38 -08:00
rm -f *.o doc.h doc.tmp doc_src/*.doxygen doc_src/*.cpp doc_src/*.o doc_src/commands.hdr
2005-11-04 03:03:48 +10:00
rm -f tests/tmp.err tests/tmp.out tests/tmp.status tests/foo.txt
2012-12-11 13:22:13 -08:00
rm -f $( PROGRAMS) fish_tests key_reader
2013-10-05 00:37:44 -07:00
rm -f command_list.txt command_list_toc.txt toc.txt
2012-07-08 15:20:39 -07:00
rm -f doc_src/index.hdr doc_src/commands.hdr
2014-08-08 03:44:37 +01:00
rm -f lexicon_filter lexicon.txt lexicon.log
2013-06-24 18:12:09 +08:00
rm -f FISH-BUILD-VERSION-FILE
2013-09-02 13:05:55 +08:00
if test " $( HAVE_DOXYGEN) " = 1; then \
2012-07-09 19:41:51 -07:00
rm -rf doc user_doc share/man; \
fi
2014-11-17 17:27:25 +08:00
rm -f po/*.gmo
2006-01-24 06:40:14 +10:00
.PHONY : clean
2005-09-20 23:26:39 +10:00
2006-11-01 01:36:14 +10:00
2005-09-20 23:26:39 +10:00
# DO NOT DELETE THIS LINE -- make depend depends on it.
2012-01-05 14:10:02 -08:00
2015-07-25 23:58:45 +08:00
autoload.o : config .h autoload .h common .h fallback .h lru .h wutil .h signal .h
autoload.o : env .h exec .h
builtin.o : config .h signal .h fallback .h wutil .h common .h builtin .h io .h
builtin.o : function .h event .h env .h complete .h proc .h parse_tree .h
2014-10-13 19:29:07 -07:00
builtin.o : tokenizer .h parse_constants .h parser .h reader .h highlight .h
2015-07-25 23:58:45 +08:00
builtin.o : color .h wgetopt .h input .h input_common .h intern .h exec .h
builtin.o : parse_util .h parser_keywords .h expand .h path .h history .h
builtin.o : wcstringutil .h builtin_set .cpp util .h builtin_commandline .cpp
builtin.o : builtin_complete .cpp builtin_ulimit .cpp builtin_jobs .cpp
builtin.o : builtin_set_color .cpp output .h builtin_printf .cpp
2012-12-08 21:41:38 -08:00
builtin_commandline.o : config .h signal .h fallback .h util .h wutil .h common .h
2014-01-24 18:37:04 -08:00
builtin_commandline.o : builtin .h io .h wgetopt .h reader .h complete .h
2015-07-19 20:59:18 +08:00
builtin_commandline.o : highlight .h env .h color .h parse_constants .h proc .h
2015-07-25 23:58:45 +08:00
builtin_commandline.o : parse_tree .h tokenizer .h parser .h event .h
builtin_commandline.o : input_common .h input .h parse_util .h
2012-12-08 21:41:38 -08:00
builtin_complete.o : config .h signal .h fallback .h util .h wutil .h common .h
builtin_complete.o : builtin .h io .h complete .h wgetopt .h parser .h proc .h
2014-01-24 18:37:04 -08:00
builtin_complete.o : parse_tree .h tokenizer .h parse_constants .h event .h
2015-07-25 23:58:45 +08:00
builtin_complete.o : reader .h highlight .h env .h color .h
builtin_jobs.o : config .h fallback .h util .h wutil .h common .h builtin .h io .h
builtin_jobs.o : proc .h signal .h parse_tree .h tokenizer .h parse_constants .h
builtin_jobs.o : parser .h event .h wgetopt .h
builtin_printf.o : common .h config .h fallback .h
2014-05-01 09:46:27 +02:00
builtin_set.o : config .h signal .h fallback .h util .h wutil .h common .h builtin .h
builtin_set.o : io .h env .h expand .h parse_constants .h wgetopt .h proc .h
2015-07-25 23:58:45 +08:00
builtin_set.o : parse_tree .h tokenizer .h parser .h event .h
builtin_set_color.o : config .h builtin .h io .h common .h fallback .h color .h
builtin_set_color.o : output .h
builtin_test.o : config .h common .h fallback .h builtin .h io .h wutil .h proc .h
2014-01-24 18:37:04 -08:00
builtin_test.o : signal .h parse_tree .h tokenizer .h parse_constants .h
2015-07-25 23:58:45 +08:00
builtin_ulimit.o : config .h fallback .h util .h builtin .h io .h common .h
2012-01-05 14:10:02 -08:00
builtin_ulimit.o : wgetopt .h
2015-07-25 23:58:45 +08:00
color.o : color .h common .h config .h fallback .h
common.o : config .h signal .h fallback .h wutil .h common .h expand .h
common.o : parse_constants .h wildcard .h complete .h util .cpp util .h
common.o : fallback .cpp
complete.o : config .h fallback .h util .h wildcard .h common .h expand .h
complete.o : parse_constants .h complete .h proc .h signal .h io .h parse_tree .h
complete.o : tokenizer .h parser .h event .h function .h env .h builtin .h exec .h
complete.o : parse_util .h wutil .h path .h iothread .h autoload .h lru .h
env.o : config .h fallback .h wutil .h common .h proc .h signal .h io .h parse_tree .h
env.o : tokenizer .h parse_constants .h env .h sanity .h expand .h history .h
env.o : reader .h complete .h highlight .h color .h env_universal_common .h input .h
env.o : input_common .h event .h path .h fish_version .h
env_universal_common.o : config .h env_universal_common .h common .h fallback .h
env_universal_common.o : wutil .h env .h util .h utf 8.h
event.o : config .h signal .h fallback .h wutil .h common .h input_common .h proc .h
event.o : io .h parse_tree .h tokenizer .h parse_constants .h parser .h event .h
exec.o : config .h signal .h fallback .h postfork .h io .h common .h wutil .h proc .h
exec.o : parse_tree .h tokenizer .h parse_constants .h exec .h parser .h event .h
exec.o : builtin .h function .h env .h parse_util .h
expand.o : config .h fallback .h util .h common .h wutil .h env .h proc .h signal .h
2014-01-24 18:37:04 -08:00
expand.o : io .h parse_tree .h tokenizer .h parse_constants .h parser .h event .h
2015-07-25 23:58:45 +08:00
expand.o : expand .h wildcard .h complete .h exec .h iothread .h parse_util .h
fallback.o : config .h fallback .h util .h
fish.o : config .h fallback .h common .h reader .h io .h complete .h highlight .h
fish.o : env .h color .h parse_constants .h builtin .h function .h event .h wutil .h
fish.o : proc .h signal .h parse_tree .h tokenizer .h parser .h expand .h intern .h
fish.o : history .h path .h input .h input_common .h fish_version .h
fish_indent.o : config .h color .h common .h fallback .h highlight .h env .h
fish_indent.o : parse_constants .h wutil .h output .h input .h input_common .h
fish_indent.o : parse_tree .h tokenizer .h print_help .h fish_version .h
2012-01-05 14:10:02 -08:00
fish_tests.o : config .h signal .h fallback .h util .h common .h proc .h io .h
2014-01-24 18:37:04 -08:00
fish_tests.o : parse_tree .h tokenizer .h parse_constants .h reader .h complete .h
fish_tests.o : highlight .h env .h color .h builtin .h function .h event .h
2015-07-25 23:58:45 +08:00
fish_tests.o : autoload .h lru .h wutil .h expand .h parser .h output .h exec .h
fish_tests.o : path .h history .h iothread .h postfork .h parse_util .h pager .h
fish_tests.o : screen .h input .h input_common .h utf 8.h env_universal_common .h
2014-09-21 19:18:56 -07:00
fish_tests.o : wcstringutil .h
2014-05-01 09:46:27 +02:00
fish_version.o : fish_version .h
2015-07-25 23:58:45 +08:00
function.o : config .h wutil .h common .h fallback .h autoload .h lru .h function .h
function.o : event .h env .h intern .h reader .h io .h complete .h highlight .h
function.o : color .h parse_constants .h parser_keywords .h
highlight.o : config .h fallback .h wutil .h common .h highlight .h env .h color .h
highlight.o : tokenizer .h parse_util .h parse_constants .h builtin .h io .h
highlight.o : function .h event .h expand .h output .h wildcard .h complete .h
highlight.o : path .h history .h parse_tree .h
history.o : config .h fallback .h sanity .h reader .h io .h common .h complete .h
history.o : highlight .h env .h color .h parse_constants .h parse_tree .h
history.o : tokenizer .h wutil .h history .h path .h signal .h iothread .h lru .h
input.o : config .h fallback .h wutil .h common .h reader .h io .h complete .h
input.o : highlight .h env .h color .h parse_constants .h proc .h signal .h
input.o : parse_tree .h tokenizer .h input_common .h input .h parser .h event .h
input.o : output .h
input_common.o : config .h fallback .h util .h common .h input_common .h
input_common.o : env_universal_common .h wutil .h env .h iothread .h
intern.o : config .h fallback .h common .h intern .h
io.o : config .h fallback .h wutil .h common .h exec .h io .h
iothread.o : config .h iothread .h common .h fallback .h signal .h
key_reader.o : config .h common .h fallback .h input_common .h
kill.o : config .h fallback .h kill .h common .h env .h exec .h path .h
output.o : config .h fallback .h wutil .h common .h output .h color .h
pager.o : config .h util .h wutil .h common .h fallback .h pager .h complete .h
pager.o : screen .h highlight .h env .h color .h reader .h io .h parse_constants .h
parse_execution.o : parse_execution .h common .h config .h fallback .h io .h
parse_execution.o : parse_constants .h parse_tree .h tokenizer .h proc .h signal .h
parse_execution.o : env .h event .h util .h parse_util .h complete .h wildcard .h
parse_execution.o : expand .h parser .h reader .h highlight .h color .h wutil .h
parse_execution.o : path .h function .h builtin .h exec .h
parse_productions.o : parse_productions .h common .h config .h fallback .h
parse_productions.o : parse_constants .h parse_tree .h tokenizer .h
parse_tree.o : common .h config .h fallback .h parse_constants .h
parse_tree.o : parse_productions .h parse_tree .h tokenizer .h wutil .h proc .h
parse_tree.o : signal .h io .h
parse_util.o : config .h fallback .h util .h wutil .h common .h tokenizer .h
parse_util.o : parse_util .h parse_constants .h expand .h env .h wildcard .h
parse_util.o : complete .h parse_tree .h builtin .h io .h
parser.o : config .h fallback .h common .h wutil .h proc .h signal .h io .h
2014-06-18 10:14:35 -07:00
parser.o : parse_tree .h tokenizer .h parse_constants .h parser .h event .h
2015-07-25 23:58:45 +08:00
parser.o : function .h env .h expand .h reader .h complete .h highlight .h color .h
parser.o : sanity .h intern .h parse_util .h parse_execution .h
parser_keywords.o : config .h fallback .h common .h parser_keywords .h
path.o : config .h fallback .h common .h env .h wutil .h path .h expand .h
path.o : parse_constants .h
postfork.o : signal .h common .h config .h fallback .h proc .h io .h parse_tree .h
postfork.o : tokenizer .h parse_constants .h wutil .h postfork .h iothread .h
2014-01-24 18:37:04 -08:00
postfork.o : exec .h
2012-01-05 14:10:02 -08:00
print_help.o : print_help .h
2012-12-08 21:41:38 -08:00
proc.o : config .h signal .h fallback .h util .h wutil .h common .h proc .h io .h
2014-01-24 18:37:04 -08:00
proc.o : parse_tree .h tokenizer .h parse_constants .h reader .h complete .h
2015-07-25 23:58:45 +08:00
proc.o : highlight .h env .h color .h sanity .h parser .h event .h output .h
2012-12-08 21:41:38 -08:00
reader.o : config .h signal .h fallback .h util .h wutil .h common .h highlight .h
2015-07-19 20:59:18 +08:00
reader.o : env .h color .h reader .h io .h complete .h parse_constants .h proc .h
2015-07-25 23:58:45 +08:00
reader.o : parse_tree .h tokenizer .h parser .h event .h history .h sanity .h exec .h
reader.o : expand .h kill .h input_common .h input .h function .h output .h screen .h
reader.o : iothread .h intern .h parse_util .h pager .h
sanity.o : config .h fallback .h common .h sanity .h proc .h signal .h io .h
2014-01-24 18:37:04 -08:00
sanity.o : parse_tree .h tokenizer .h parse_constants .h history .h wutil .h
sanity.o : reader .h complete .h highlight .h env .h color .h kill .h
2015-07-25 23:58:45 +08:00
screen.o : config .h fallback .h common .h util .h output .h color .h highlight .h
screen.o : env .h screen .h pager .h complete .h reader .h io .h parse_constants .h
signal.o : config .h signal .h common .h fallback .h wutil .h event .h reader .h io .h
signal.o : complete .h highlight .h env .h color .h parse_constants .h proc .h
signal.o : parse_tree .h tokenizer .h
tokenizer.o : config .h fallback .h common .h wutil .h tokenizer .h
2014-05-01 09:46:27 +02:00
utf8.o : utf 8.h
2015-07-25 23:58:45 +08:00
util.o : config .h fallback .h util .h common .h wutil .h
wcstringutil.o : config .h wcstringutil .h common .h fallback .h
wgetopt.o : config .h common .h fallback .h wgetopt .h wutil .h
wildcard.o : config .h fallback .h wutil .h common .h wildcard .h expand .h
wildcard.o : parse_constants .h complete .h reader .h io .h highlight .h env .h
wildcard.o : color .h
wutil.o : config .h fallback .h common .h wutil .h