AtomBuild / atom-build-make

GNU Make plugin for atom-build
MIT License
13 stars 19 forks source link

custom target name #15

Closed spacelatte closed 8 years ago

spacelatte commented 8 years ago

please allow giving custom target names for example i have:

%.c:
    clang -o $@.o $@

so i can specify "test.c" "123.c" for testing individual modules, not to build entire project

also 1 step forward is specifying '%' as target name and using case...esac to do something according to file extension/content

case "$@" in
    *.c)
        clang -o test_$@.o $@
        ;;
    *.cpp)
        clang++ -o $@.o $@
        ;;
    */)
        cd $@; make;
        ;;
esac

something like that

noseglid commented 8 years ago

This is currently not possible, but might be a useful addition.

If you have a small set of files you could create custom build commands, something like (in .atom-build.yml)

cmd: make
args:
  -  123.c