Commit 6222d4ce authored by klaatu's avatar klaatu

Fixed configure.ac and Makefile.am

This fix is untested on Darwin and Windows.

Thanks to Gabriele Fulgaro.
parent 7be72c25
Pipeline #110360946 passed with stage
in 1 minute and 37 seconds
......@@ -6,11 +6,13 @@ EXTRA_DIST = slackware/trashy.info slackware/doinst.sh slackware/slack-desc slac
all-am: trashy
trashy: bin/trashy
if DARWIN
@sed -i "s|__BASKETVAR__|~/.Trash|" bin/$@
else
if LINUX
@sed -i "s|__BASKETVAR__|~/.local/share/Trash|" bin/$@
else
@sed -i "s|__BASKETVAR__|~/.Trash|" bin/$@
endif
@sed -i "s|__VERNUMVAR__|@PACKAGE_VERSION@|" bin/$@
nuke:
......@@ -19,3 +21,5 @@ nuke:
@rm -r autom4te.cache/
@rm aclocal.m4
@rm compile install-sh missing Makefile.in
@rm config.guess
@rm config.sub
#!/usr/bin/env bash
VERSION=__VERNUMVAR__
VERSION=2.4.2
# trash - the command line trashcan
#
# Copyright (C) 2011-17 Klaatu la Terible
......@@ -26,7 +26,7 @@ VERSION=__VERNUMVAR__
#esac
# this is set by ./configure && make
BASKET=__BASKETVAR__
BASKET=~/.local/share/Trash
test -d $BASKET/info || mkdir -m 700 -p $BASKET/info 2> /dev/null
test -d $BASKET/files || mkdir -m 700 -p $BASKET/files 2> /dev/null
......
AC_INIT([trashy], [2.4.0], [klaatu@member.fsf.org])
AC_INIT([trashy], [2.4.2], [klaatu@member.fsf.org])
AM_INIT_AUTOMAKE
AC_PROG_CC
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
AM_CONDITIONAL([DARWIN], [test $(uname -s) == "Darwin"])
# provides host_os
AC_CANONICAL_HOST
build_linux=no
build_win=no
build_darwin=no
# Detect target system
case "${host_os}" in
linux*)
build_linux=yes
;;
cygwin*|mingw*)
build_win=yes
;;
darwin*)
build_darwin=yes
;;
*)
AC_MSG_ERROR(["OS $host_os is not directly supported, but if you run Bash then you can probably install manually"])
;;
esac
# Pass to automake
AM_CONDITIONAL([LINUX], [test "$build_linux" == "yes"])
AM_CONDITIONAL([WIN], [test "$build_win" == "yes"])
AM_CONDITIONAL([DARWIN], [test "$build_darwin" == "yes"])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment