Last active
October 13, 2018 20:12
-
-
Save mondeja/bae5ee0315d71fa539d07d1acc8e86dc to your computer and use it in GitHub Desktop.
`make` command wrapper for Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Uses as Make GNU, for example `make start` | |
:: will executes :start function. | |
:: Keep in mind that this implementation | |
:: has some limitations. For example, you can't | |
:: call more than one command from another command | |
:: if the called command has an `goto :end` line, | |
:: because the script will terminate on first | |
:: `goto <command>` invocation. | |
:: Do not display commands | |
@ECHO OFF | |
SETLOCAL | |
:: Set local variables here | |
set python=python3 | |
:: Wrapper to call the command passed as first argument | |
:__wrapper | |
CALL :%1 | |
goto :end | |
:: Documentation commands | |
:doc | |
goto :doc-html | |
:doc-html | |
cd doc | |
call make.bat html | |
cd .. | |
goto :end | |
:: Development operations | |
:start | |
%python% manage.py runserver | |
goto :end | |
:run | |
goto :start | |
:runserver | |
goto :start | |
:: End of file. All commands ends going to here | |
:: avoiding that this script would continues | |
:: executing function by function | |
:end | |
ENDLOCAL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment