diff --git a/Makefile.in b/Makefile.in index 0e1597efd..1bbabf9c7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 diff --git a/configure.ac b/configure.ac index 205d1bfe9..16efd236c 100644 --- a/configure.ac +++ b/configure.ac @@ -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." diff --git a/etc/fish.in b/etc/fish.in index fd04a5874..5b5c72edf 100644 --- a/etc/fish.in +++ b/etc/fish.in @@ -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 diff --git a/main.c b/main.c index 47231dc53..458c6841f 100644 --- a/main.c +++ b/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 ); diff --git a/share/fish.in b/share/fish.in index a7e6e1dd0..226a5a24a 100644 --- a/share/fish.in +++ b/share/fish.in @@ -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