pass options to cargo

This commit is contained in:
Konstantin Stepanov 2015-12-10 21:31:05 +03:00
parent 5d26a7fb5e
commit 05299d1ed6
2 changed files with 11 additions and 29 deletions

View File

@ -57,7 +57,8 @@ test: all
cargo test
build: all
cargo install --path $(CURDIR) --root $(builddir) --features "$(schedules) $(persistent)"
RUN_PARTS="$(runparts)" STATE_DIR="$(statedir)" cargo install --path $(CURDIR) --root $(builddir) \
--features "$(schedules) $(persistent)"
install: build
install -m2755 -g `getent group cron || echo root` -s -D $(builddir)/bin/crontab $(DESTDIR)$(bindir)/crontab

37
configure vendored
View File

@ -158,56 +158,37 @@ do
done
if [ ${enable_boot} = 'yes' ]; then
schedules="${schedules} boot"
else
schedules_not="${schedules_not} boot"
schedules="${schedules} sched-boot"
fi
if [ ${enable_minutely} = 'yes' ]; then
schedules="${schedules} minutely"
else
schedules_not="${schedules_not} minutely"
schedules="${schedules} sched-minutely"
fi
if [ ${enable_hourly} = 'yes' ]; then
schedules="${schedules} hourly"
else
schedules_not="${schedules_not} hourly"
schedules="${schedules} sched-hourly"
fi
if [ ${enable_daily} = 'yes' ]; then
schedules="${schedules} daily"
else
schedules_not="${schedules_not} daily"
schedules="${schedules} sched-daily"
fi
if [ ${enable_weekly} = 'yes' ]; then
schedules="${schedules} weekly"
else
schedules_not="${schedules_not} weekly"
schedules="${schedules} sched-weekly"
fi
if [ ${enable_monthly} = 'yes' ]; then
schedules="${schedules} monthly"
else
schedules_not="${schedules_not} monthly"
schedules="${schedules} sched-monthly"
fi
if [ ${enable_quarterly} = 'yes' ]; then
schedules="${schedules} quarterly"
else
schedules_not="${schedules_not} quarterly"
schedules="${schedules} sched-quarterly"
fi
if [ ${enable_semi_annually} = 'yes' ]; then
schedules="${schedules} semi-annually"
else
schedules_not="${schedules_not} semi-annually"
schedules="${schedules} sched-semi-annually"
fi
if [ ${enable_yearly} = 'yes' ]; then
schedules="${schedules} yearly"
else
schedules_not="${schedules_not} yearly"
schedules="${schedules} sched-yearly"
fi
echo '# Generated by ./configure' > Makefile
sed "
s|@schedules@|${schedules}|g
s|@schedules_not@|${schedules_not}|g
s|@enable_persistent@|${enable_persistent}|g
s|@prefix@|${prefix}|g
s|@bindir@|${bindir}|g