Windows has nmake available, but I would recommend installing GNU Make from GNUWin32. Note both are just programs, not built-ins.
Powershell has its own variant of trap.