(Not a GNU Make expert)
Makefile for Python Web Development & related projects.
Django (startapp, startproject, etc.)
Python packaging (flake8, yapf, etc.)
Heroku (debug, push, etc.)
Laziness e.g.
$ make world
Familiarity e.g.
$ ./configure; make; make install
Simplicity e.g.
$ cp ~/Developer/project-makefile <DIR>
____----------- _____ \~~~~~~~~~~/~_--~~~------~~~~~ \ `---`\ _-~ | \ _-~ <_ | \[] / ___ ~~--[""] | ________-------'_ > /~` \ |-. `\~~.~~~~~ _ ~ - _ ~| ||\% | | ~ ._ ~ _ ~ ._ `_//|_% \ | ~ . ~-_ /\ `--__ | _-____ /\ ~-_ \/. ~--_ / ,/ -~-_ \ \/ _______---~/ ~~-/._< \ \`~~~~~~~~~~~~~ ##--~/ \ ) |`------##---~~~~-~ ) ) ~-_/_/ ~~ ~~
E.g. Ansible, Chef, Puppet
_________ This _.--""'-----, `"--.._ Makefile .-'' _/_ ; .'"----,`-, .' :___: ; : ;;`.`. . _.- _.- .' : :: `.. __;..----------------' :: ___ :: ;; .--"". ' ___.....`:=(___)-' :--'`. .' .' .--''__ : ==: ; .--/ / .'.'' ``-, : : '`-. ."', : / .'-`\\ .--.\ : : , _\ ; ; | ; /:' ;; /__ \\: : : /_\\ |\_/ | | / \__// /"--\\ \: : : ;|`\| : " /\__/\____// """ / \\ : : : :|'|| ["""""""""--------........._ / || ; __.:--' :|//| "------....______ ].'| // |--"""'__...-'`\ \// `| GNUMAKE |__;_...--'": : \ // |---""" \__\_/ """""""""' \ \ \_.// / `---' \ \_ _' `--`---' dp
[buildout] extends = http://your-project
alias do="echo do stuff"
def do_stuff(): print("do stuff")
all: average counter list roach average: gcc average.c -o average counter: gcc counter.c -o counter list: gcc list.c -o list roach: gcc roach.c -o roach trapezoid: gcc trapezoid.c -o trapezoid clean: rm average counter list roach
all: average counter list roach average: gcc average.c -o average counter: gcc counter.c -o counter list: gcc list.c -o list roach: gcc roach.c -o roach trapezoid: gcc trapezoid.c -o trapezoid clean: rm average counter list roach
objects = average.o all: average counter list roach average: $(objects) gcc -o average $(objects) counter: gcc counter.c -o counter list: gcc list.c -o list roach: gcc roach.c -o roach trapezoid: gcc trapezoid.c -o trapezoid clean: rm average counter list roach
mkdir <YOUR-PROJECT>
cd <YOUR-PROJECT>
curl -O https://raw.githubusercontent.com\ /aclark4life/project-makefile/master/Makefile
$ make help Usage: make [TARGET] Available targets: - ablog-build - ablog-init - ablog-serve …
A target is usually the name of a file that is generated by a program; examples of targets are executable or object files. A target can also be the name of an action to carry out, such as ‘clean’ (see Phony Targets). (https://www.gnu.org/software/make/manual/make.html#Rule-Introduction)
$ make help
help: @echo "Usage:…
help: @echo "Usage: make [TARGET]\nAvailable targets:\n" @$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F:\ '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}'\ | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs | tr ' ' '\n' | awk\ '{print " - "$$0}' | less # http://stackoverflow.com/a/26339924 @echo "\n"
targets : prerequisites recipe …
(https://www.gnu.org/software/make/manual/html_node/Rule-Syntax.html#Rule-Syntax)
$ make
.DEFAULT_GOAL=git-commit-auto-push
…
git-commit-auto-push: git-commit-auto git-push
# Git MESSAGE="Update" … commit-auto: git-commit-auto # Alias commit-edit: git-commit-edit # Alias git-commit: git-commit-auto # Alias git-commit-auto-push: git-commit-auto git-push … git-commit-auto: git commit -a -m $(MESSAGE) git-commit-edit: git commit -a git-push: git push
$ make ablog-init
ablog-init:
bin/ablog start
$ make ablog
ablog: ablog-clean \ ablog-install\ ablog-init \ ablog-build \ ablog-serve
$ make django
django: django-clean \ django-install\ django-init \ django-migrate\ django-su\ django-serve
$ make sphinx
sphinx: sphinx-clean \ sphinx-install \ sphinx-init \ sphinx-build \ sphinx-serve
$ make grunt
grunt: grunt-init \ grunt-serve
$ make npm
npm: npm-init \ npm-install
$ make plone
plone: plone-install \ plone-init\ plone-serve
$ make vagrant
vagrant: vagrant-init
$ make django
django: django-clean\ django-install\ django-init \ django-migrate\ django-su \ django-serve
$ make lint
lint: python-lint python-lint: python-flake\ python-yapf\ python-wc