I\'m looking to save myself some effort further down the line by making a fairly generic makefile that will put together relatively simple C++ projects for me with minimal m
I solved the portability problem by creating a Python script called mkdir.py
and calling it from the Makefile. A limitation is that Python must be installed, but this is most likely true for any version of UNIX.
#!/usr/bin/env python
# Cross-platform mkdir command.
import os
import sys
if __name__=='__main__':
if len(sys.argv) != 2:
sys.exit('usage: mkdir.py ')
directory = sys.argv[1]
try:
os.makedirs(directory)
except OSError:
pass