mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Initialize etc/fish and share/fish from the Makefile, not automatically by Autoconf. That way we get correct expansion of ${prefix} and friends to their install-time value. This fixes a bug reported by James Vega.
darcs-hash:20060718164155-ac50b-8ec6c63d9c4e52db2c1884fcffeab78333367773.gz
This commit is contained in:
parent
3e843f8219
commit
57b3965518
5 changed files with 18 additions and 16 deletions
|
@ -47,7 +47,6 @@ datadir = @datadir@
|
|||
bindir = @bindir@
|
||||
mandir = @mandir@
|
||||
sysconfdir = @sysconfdir@
|
||||
fishinputfile = @fishinputfile@
|
||||
docdir = @docdir@
|
||||
|
||||
#etc files to install
|
||||
|
@ -184,7 +183,7 @@ TRANSLATIONS_SRC := $(wildcard po/*.po)
|
|||
TRANSLATIONS := $(TRANSLATIONS_SRC:.po=.gmo)
|
||||
|
||||
#Make everything needed for installing fish
|
||||
all: $(PROGRAMS) user_doc
|
||||
all: $(PROGRAMS) user_doc etc/fish share/fish
|
||||
@echo fish has now been built.
|
||||
@echo Use \'make install\' to install fish.
|
||||
.PHONY: all
|
||||
|
@ -250,6 +249,10 @@ doc.h:$(BUILTIN_DOC_SRC) $(CMD_DOC_SRC) doc_src/doc.hdr
|
|||
cat $*.txt >>$@;
|
||||
echo "*/" >>$@
|
||||
|
||||
%: %.in Makefile
|
||||
sed <$@.in >$@ -e "s,@sysconfdir\@,$(sysconfdir)," -e "s,@datadir\@,$(datadir)," -e "s,@docdir\@,$(docdir)," -e "s|@configure_input\@|$@, generated from $@.in by the Makefile. DO NOT MANUALLY EDIT THIS FILE!|"
|
||||
#-e "s,@\@,$(),"
|
||||
|
||||
# Compile translation file
|
||||
%.gmo:
|
||||
if test $(HAVE_GETTEXT) = 1; then \
|
||||
|
@ -511,7 +514,7 @@ set_color: set_color.o doc_src/set_color.o common.o
|
|||
|
||||
# Test program for the tokenizer library
|
||||
tokenizer_test: tokenizer.c tokenizer.h wutil.o common.o
|
||||
$(CC) ${CFLAGS} tokenizer.c wutil.o common.o -D TOKENIZER_TEST $(LDFLAGS) -o $@
|
||||
$(CC) $(CFLAGS) tokenizer.c wutil.o common.o -D TOKENIZER_TEST $(LDFLAGS) -o $@
|
||||
|
||||
# Neat little program to show output from terminal
|
||||
key_reader: key_reader.o input_common.o common.o env_universal.o env_universal_common.o wutil.o
|
||||
|
|
|
@ -230,12 +230,11 @@ AC_SUBST( DATADIR, ["$(eval echo $datadir)"] )
|
|||
AC_ARG_VAR( [docdir], [Documentation direcotry] )
|
||||
|
||||
if test -z $docdir; then
|
||||
AC_SUBST(docdir,[$datadir/doc/fish])
|
||||
AC_SUBST(docdir, [$datadir/doc/fish] )
|
||||
else
|
||||
AC_SUBST(docdir, [$docdir])
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED( DOCDIR, [L"$(eval echo $docdir)"], [Documentation directory] )
|
||||
|
||||
|
||||
# Set up locale directory. This is where the .po files will be
|
||||
# installed.
|
||||
AC_DEFINE_UNQUOTED( [LOCALEDIR], "$(eval echo $datadir)/locale", [Locale directory])
|
||||
|
@ -348,7 +347,7 @@ case $target_os in
|
|||
esac
|
||||
|
||||
# Tell the world what we know
|
||||
AC_CONFIG_FILES([Makefile fish.spec doc_src/fish.1 doc_src/Doxyfile etc/fish etc/fish_interactive.fish share/fish seq])
|
||||
AC_CONFIG_FILES([Makefile fish.spec doc_src/fish.1 doc_src/Doxyfile etc/fish_interactive.fish seq])
|
||||
AC_OUTPUT
|
||||
|
||||
echo "fish is now configured."
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
# Set default search paths for completions and shellscript functions
|
||||
#
|
||||
|
||||
set -g fish_function_path ~/.fish.d/functions @SYSCONFDIR@/fish.d/functions @DATADIR@/fish/functions
|
||||
set -g fish_complete_path ~/.fish.d/completions @SYSCONFDIR@/fish.d/completions @DATADIR@/fish/completions
|
||||
set -g fish_function_path ~/.fish.d/functions @sysconfdir@/fish.d/functions @datadir@/fish/functions
|
||||
set -g fish_complete_path ~/.fish.d/completions @sysconfdir@/fish.d/completions @datadir@/fish/completions
|
||||
|
||||
#
|
||||
# Set default field separators
|
||||
|
|
2
main.c
2
main.c
|
@ -81,8 +81,6 @@ static int read_init()
|
|||
return 0;
|
||||
}
|
||||
|
||||
env_set( L"__fish_help_dir", DOCDIR, 0);
|
||||
|
||||
eval( L"builtin cd " DATADIR L"/fish 2>/dev/null; and . fish 2>/dev/null", 0, TOP );
|
||||
eval( L"builtin cd " SYSCONFDIR L" 2>/dev/null; and . fish 2>/dev/null", 0, TOP );
|
||||
eval( L"builtin cd 2>/dev/null; and . .fish 2>/dev/null", 0, TOP );
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
# common helper functions for the command completions. All actual
|
||||
# completions are located in the completions subdirectory.
|
||||
#
|
||||
# @configure_input@
|
||||
|
||||
#
|
||||
# Assign a temporary value here for performance reasons. The real value should be set in /etc/fish.
|
||||
#
|
||||
# Assign a temporary value here for performance reasons. The real
|
||||
# value should be set in /etc/fish.
|
||||
|
||||
set -g fish_function_path @datadir@/functions/
|
||||
set __fish_help_dir @docdir@
|
||||
|
||||
set -g fish_function_path $PWD/functions/
|
||||
|
||||
#
|
||||
# Make sure there are no invalid entries in the PATH
|
||||
|
|
Loading…
Reference in a new issue