From d35d65cc40f55a6c34abafbfdb9283a75c096f2f Mon Sep 17 00:00:00 2001 From: Grissiom Date: Sat, 18 Sep 2010 13:27:34 +0800 Subject: [PATCH] use variables as xsel target --- Makefile.in | 21 ++++++++++++++------- configure.ac | 5 +++-- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Makefile.in b/Makefile.in index 6bc04a6d1..c2329dd40 100644 --- a/Makefile.in +++ b/Makefile.in @@ -245,7 +245,7 @@ FUNCTIONS_DIR_FILES := $(wildcard share/functions/*.fish) # SIMPLE_PROGRAMS := fish set_color mimedb fish_pager fishd fish_indent -PROGRAMS := $(SIMPLE_PROGRAMS) @XSEL@ @SEQ_FALLBACK@ +PROGRAMS := $(SIMPLE_PROGRAMS) @XSEL_BIN@ @SEQ_FALLBACK@ # @@ -264,6 +264,13 @@ TRANSLATIONS_SRC := $(wildcard po/*.po) TRANSLATIONS := $(TRANSLATIONS_SRC:.po=.gmo) +# +# Extra util +# + +XSEL := @XSEL@ +XSEL_BIN := @XSEL_BIN@ + # # Make everything needed for installing fish # @@ -342,14 +349,14 @@ test: $(PROGRAMS) fish_tests # Build the xsel program, which is maintained in its own tarball # -xsel-1.2.0: - tar -xf xsel-1.2.0.tar.gz +${XSEL}: + tar -xf ${XSEL}.tar.gz -xsel-1.2.0/Makefile: xsel-1.2.0 - cd xsel-1.2.0 && ./configure +${XSEL}/Makefile: ${XSEL} + cd ${XSEL} && ./configure -xsel-1.2.0/xsel: xsel-1.2.0/Makefile - $(MAKE) -C xsel-1.2.0 || echo "Failed to build xsel - either add the required dependencies or use './configure --without-xsel' to disable it." +${XSEL_BIN}: ${XSEL}/Makefile + $(MAKE) -C ${XSEL} || echo "Failed to build xsel - either add the required dependencies or use './configure --without-xsel' to disable it." # diff --git a/configure.ac b/configure.ac index 5eb58ca03..a5b6ec811 100644 --- a/configure.ac +++ b/configure.ac @@ -206,9 +206,10 @@ AC_ARG_WITH( ) if [[ "$xsel" = "with_xsel" ]]; then - XSEL=xsel-1.2.0/xsel + XSEL=xsel-1.2.0 + XSEL_BIN=$XSEL/xsel XSEL_MAN=xsel.1x - XSEL_MAN_PATH=xsel-1.2.0/xsel.1x + XSEL_MAN_PATH=$XSEL/xsel.1x fi