You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
genmarkov/Makefile

30 lines
757 B

FEATURES:="api,always-aggregate,split-sentance"
VERSION:=`cargo read-manifest | rematch - 'version":"([0-9\.]+)"' 1`
markov:
cargo build --release --features $(FEATURES)
strip target/release/markov
install:
-rc-service markov shutdown && sleep 0.6
-rc-service markov stop
cp -f target/release/markov /usr/local/bin/markov
rc-service markov start
reinstall: uninstall
cp -f target/release/markov /usr/local/bin/markov
rm -f /var/nginx/markov.dat
rc-service markov start
sleep 0.2
curl -X PUT --data-binary @default http://127.0.0.1:8001/put
uninstall:
-rc-service markov stop
rm -f /usr/local/bin/markov
package:
git add .
-git commit -S -m "Packaging version $(VERSION)"
cargo package
mv ./target/package/markov-$(VERSION).crate{,.gz}