shake

minimal build system that generates Ninja build files

git clone https://9o.is/git/shake.git

Shakefile

(484B)


      1 let CC      ${CC:-cc}
      2 let CFLAGS  ${CFLAGS:--Wall -Wextra -g}
      3 let PREFIX  ${PREFIX:-/usr/local}
      4 let DESTDIR ${DESTDIR:-}
      5 
      6 SHAKE_FORMAT='%6s %s'
      7 
      8 rule cc $CC $CFLAGS -c $in -o $out
      9     bind description CC $in
     10 
     11 rule link $CC $in -o $out
     12     bind description LINK $out
     13 
     14 rule cp cp -f $in $out
     15     bind description CP $in
     16 
     17 cc    main.o: main.c
     18 cc   hello.o: hello.c
     19 link   hello: main.o hello.o
     20 
     21 cp $DESTDIR$PREFIX/bin/hello: hello
     22 phony install: $DESTDIR$PREFIX/bin/hello
     23 
     24 default hello