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:
axel 2006-07-19 02:41:55 +10:00
parent 3e843f8219
commit 57b3965518
5 changed files with 18 additions and 16 deletions

View file

@ -47,7 +47,6 @@ datadir = @datadir@
bindir = @bindir@ bindir = @bindir@
mandir = @mandir@ mandir = @mandir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
fishinputfile = @fishinputfile@
docdir = @docdir@ docdir = @docdir@
#etc files to install #etc files to install
@ -184,7 +183,7 @@ TRANSLATIONS_SRC := $(wildcard po/*.po)
TRANSLATIONS := $(TRANSLATIONS_SRC:.po=.gmo) TRANSLATIONS := $(TRANSLATIONS_SRC:.po=.gmo)
#Make everything needed for installing fish #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 fish has now been built.
@echo Use \'make install\' to install fish. @echo Use \'make install\' to install fish.
.PHONY: all .PHONY: all
@ -250,6 +249,10 @@ doc.h:$(BUILTIN_DOC_SRC) $(CMD_DOC_SRC) doc_src/doc.hdr
cat $*.txt >>$@; cat $*.txt >>$@;
echo "*/" >>$@ 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 # Compile translation file
%.gmo: %.gmo:
if test $(HAVE_GETTEXT) = 1; then \ 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 # Test program for the tokenizer library
tokenizer_test: tokenizer.c tokenizer.h wutil.o common.o 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 # 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 key_reader: key_reader.o input_common.o common.o env_universal.o env_universal_common.o wutil.o

View file

@ -230,12 +230,11 @@ AC_SUBST( DATADIR, ["$(eval echo $datadir)"] )
AC_ARG_VAR( [docdir], [Documentation direcotry] ) AC_ARG_VAR( [docdir], [Documentation direcotry] )
if test -z $docdir; then if test -z $docdir; then
AC_SUBST(docdir,[$datadir/doc/fish]) AC_SUBST(docdir, [$datadir/doc/fish] )
else
AC_SUBST(docdir, [$docdir])
fi fi
AC_DEFINE_UNQUOTED( DOCDIR, [L"$(eval echo $docdir)"], [Documentation directory] )
# Set up locale directory. This is where the .po files will be # Set up locale directory. This is where the .po files will be
# installed. # installed.
AC_DEFINE_UNQUOTED( [LOCALEDIR], "$(eval echo $datadir)/locale", [Locale directory]) AC_DEFINE_UNQUOTED( [LOCALEDIR], "$(eval echo $datadir)/locale", [Locale directory])
@ -348,7 +347,7 @@ case $target_os in
esac esac
# Tell the world what we know # 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 AC_OUTPUT
echo "fish is now configured." echo "fish is now configured."

View file

@ -7,8 +7,8 @@
# Set default search paths for completions and shellscript functions # 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_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_complete_path ~/.fish.d/completions @sysconfdir@/fish.d/completions @datadir@/fish/completions
# #
# Set default field separators # Set default field separators

2
main.c
View file

@ -81,8 +81,6 @@ static int read_init()
return 0; 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 " 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 " 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 ); eval( L"builtin cd 2>/dev/null; and . .fish 2>/dev/null", 0, TOP );

View file

@ -3,12 +3,14 @@
# common helper functions for the command completions. All actual # common helper functions for the command completions. All actual
# completions are located in the completions subdirectory. # completions are located in the completions subdirectory.
# #
# @configure_input@
# # Assign a temporary value here for performance reasons. The real
# Assign a temporary value here for performance reasons. The real value should be set in /etc/fish. # 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 # Make sure there are no invalid entries in the PATH