Windows equivalent to this Makefile
The advantage of writing a Makefile is that "make" is generally assumed to be present on the various Unices (Linux and Mac primarily).
Now I have the following Makefile:
PYTHON := python
all: e installdeps
e:
开发者_如何学JAVA virtualenv --distribute --python=${PYTHON} e
installdeps:
e/bin/python setup.py develop
e/bin/pip install unittest2
test:
e/bin/unit2 discover
clean:
rm -rf e
As you can see this Makefile uses simple targets and variable substitution. Can this be achieved on Windows? By that mean - without having to install external tools (like cygwin make); perhaps make.cmd? Typing "make installdeps" for instance, should work both on Unix and Windows.
Something simple like that, yes. However, if you'd like to continue to improve that makefile, you might consider just writing the "makefile" (rather installation script) in a more portable language. You have to have some assumptions. If its a python project, I'm sure you assume python is installed. So write the equivalent of your makefile in python.
精彩评论