runfile (rfile)
a suckless and minimal, POSIX C99 alternative to Makefile/justfile!
install rf
you can either install the AUR package rf with your favourite AUR helper
or build rfile manually with gcc or any other POSIX C99 compiler
extra compile options
you can enable the following flags to enable extra feautures for rf:
using
gccyou can dogcc -D FLAG_NAME ...
RF_EXTRAS: enables allEXTRA_*featuresRF_EXTRA_MORE_COMMENTS: enables//and--comments forrfilesRF_HIDDEN_CMD: hides the$ cmdfor commands
rfile syntax & features
#-> ignore line (comment)
variables
the variable system in rfiles is very minimal:
- every variable is a string
- when accessed,
rftext-substitutes the variable with its content
example:
@cc=gcc
@inp=rf.c
@out=rf
@opts=-Wall -Wextra -pedantic -std=c99
@cc @inp -o @out @opts
# becomes 'gcc rf.c -o rf -Wall -Wextra -pedantic -std=c99'
rfile command prefix (@)
@:! [msg]-> print/log with box/banner@: [msg]-> print/log@var=cmd-> create variablevar@var-> access variablevar
command sections
example syntax:
section {
@: hello!
}
every other line is treated as a command and will run normally.
if no section is specified when calling
rf, only commands in global scope will run.
usage
- create an
rfile. - run
rf [section name]:)