Add platform-specific command parameters to genrule.

Summary:
Add 2 parameters `win` and `sh` to `genrule` and make `cmd` optional,
in which `win` is Windows-specific and `sh` is non-windows specific command.
`cmd` is platform independent and has a lower priority if the platform-specific command is given.

The priority sequence is (on Windows):

  "cmd.exe /c [cmd_exe]"
  "cmd.exe /c [cmd]"

On non-windows os:

  "/bin/bash -c [bash]"
  "/bin/bash -c [cmd]"

This would provide backward compatibility.

Test Plan: Unit tests.
13 files changed
tree: bb9e3c0fc758eb484742c19bfcfd36204d6454df
  1. .idea/
  2. bin/
  3. config/
  4. docs/
  5. lib/
  6. pmd/
  7. scripts/
  8. src/
  9. test/
  10. testdata/
  11. third-party/
  12. .buckconfig
  13. .classpath
  14. .gitignore
  15. .project
  16. buck.iml
  17. build.xml
  18. DEFS
  19. LICENSE
  20. README.md
README.md

Buck

Buck is an Android build tool. To see what Buck can do for you, check out the documentation at http://facebook.github.io/buck/.

Installation

To build Buck, run the following:

git clone git@github.com:facebook/buck.git
cd buck
ant
./bin/buck --help

License

Apache License 2.0