Commit da45e63e authored by thomas.forbriger's avatar thomas.forbriger

Makefile [FIX]: change name of install path variable

binary installation directory is hard-wired;
use variable name CSBACKBINDIR instead of LOCBINDIR to avoid conflicts with
Seitosh
parent d5ca6a1d
......@@ -29,6 +29,9 @@
# 28/02/2013 V0.7 added csbackscp.py
# 08/11/2013 V0.8 several csbackgen.py tests implemented which are
# related to the time exclusion commandline arguments
# 15/07/2016 V1.0 binary installation directory is hard-wired; use
# CSBACKBINDIR instead of LOCBINDIR to avoid conflicts with
# Seitosh
#
# ----------------------------------------------------------------------------
PROGRAMS=csback2cron.py csbackntfy.py csbackgen.py csbackchk.py csbackobs.py \
......@@ -44,7 +47,7 @@ install: installscripts
doc: pdfdoc
# ----------------------------------------------------------------------------
LOCBINDIR=~/bin
CSBACKBINDIR=$(HOME)/bin
RSYNC=$(shell env which rsync)
CRON=$(shell ps -ef | grep -v grep | grep -cw cron)
SYSLOGNG=$(shell ps -ef | grep -v grep | grep -cw syslog)
......@@ -56,8 +59,8 @@ SCP=$(shell env which scp)
# ----------------------------------------------------------------------------
.PHONY: clean
clean:
/bin/rm -rvf $(addprefix $(LOCBINDIR)/,$(patsubst %.py,%,$(PROGRAMS)))
/bin/rm -rvf $(addprefix $(LOCBINDIR)/,$(patsubst %.sh,%,$(PROGRAMS)))
/bin/rm -rvf $(addprefix $(CSBACKBINDIR)/,$(patsubst %.py,%,$(PROGRAMS)))
/bin/rm -rvf $(addprefix $(CSBACKBINDIR)/,$(patsubst %.sh,%,$(PROGRAMS)))
/bin/rm -fv flist *.bak
$(MAKE) -C doc clean
......@@ -86,25 +89,25 @@ CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
CHECKPROG=$(if $($(1)),,$(error ERROR: missing program $(1)))
CHECKPROGS=$(foreach prog,$(1),$(call CHECKPROG,$(prog)))
$(call CHECKVARS, LOCBINDIR)
$(call CHECKVARS, CSBACKBINDIR)
$(call CHECKPROGS, RSYNC CRON SYSLOGNG LOGROTATE PYTHON SSH SCP)
# ----------------------------------------------------------------------------
PWD=$(shell env pwd)
$(addprefix $(LOCBINDIR)/, $(PROGRAMS)): $(addprefix $(PWD)/, $(PROGRAMS))
$(addprefix $(CSBACKBINDIR)/, $(PROGRAMS)): $(addprefix $(PWD)/, $(PROGRAMS))
$(LOCBINDIR)/%: %.py
mkdir -pv $(LOCBINDIR)
$(CSBACKBINDIR)/%: %.py
mkdir -pv $(CSBACKBINDIR)
ln -fs $(addprefix $(PWD)/,$<) $@
chmod +x $(addprefix $(PWD)/,$<)
$(LOCBINDIR)/%: %.sh
mkdir -pv $(LOCBINDIR)
$(CSBACKBINDIR)/%: %.sh
mkdir -pv $(CSBACKBINDIR)
ln -fs $(addprefix $(PWD)/,$<) $@
chmod +x $(addprefix $(PWD)/,$<)
installscripts: $(addprefix $(LOCBINDIR)/, $(patsubst %.py,%,$(PROGRAMS)) \
installscripts: $(addprefix $(CSBACKBINDIR)/, $(patsubst %.py,%,$(PROGRAMS)) \
$(patsubst %.sh,%,$(PROGRAMS)))
# ----------------------------------------------------------------------------
......
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