Minor fix to shake build
This commit is contained in:
parent
470e9c7b85
commit
8a0776df67
6
README
6
README
@ -4,9 +4,9 @@ Simply embed EXEC: and :STOP into any file and it'll run just fine, example:
|
|||||||
|
|
||||||
EXEC:shell command ...:STOP
|
EXEC:shell command ...:STOP
|
||||||
|
|
||||||
you may see a real example in the primary and only source file: `baked.c',
|
you may see a real example in the primary and only source file: `baked.c'.
|
||||||
and in `install.sh'. this is not targeted toward any language and should
|
this is not targeted toward any language and should be fairly flexible,
|
||||||
be fairly flexible, especially when multi-line comments are available.
|
especially when multi-line comments are available.
|
||||||
|
|
||||||
Name/arg extension:
|
Name/arg extension:
|
||||||
|
|
||||||
|
8
baked.c
8
baked.c
@ -11,14 +11,14 @@
|
|||||||
*
|
*
|
||||||
* This program is independent of language, it simply expects the notation as listed below,
|
* This program is independent of language, it simply expects the notation as listed below,
|
||||||
*
|
*
|
||||||
* EXEC:cc baked.c -o baked -std=gnu99 -O2 -Wall -Wextra -Wpedantic -pipe $CFLAGS:STOP
|
* EXEC:cc $@ -o $* -std=gnu99 -O2 -Wall -Wextra -Wpedantic -pipe $CFLAGS:STOP
|
||||||
*
|
*
|
||||||
* Which will run, and in this case, result in this program compiling itself.
|
* Which will run, and in this case, result in this program compiling itself.
|
||||||
*
|
*
|
||||||
* Another (functional) example:
|
* Another (functional) example:
|
||||||
EXEC:
|
EXEC:
|
||||||
CFLAGS='-std=gnu99 -O2 -Wall -Wextra -Wpedantic -pipe'
|
CFLAGS='-std=gnu99 -O2 -Wall -Wextra -Wpedantic -pipe'
|
||||||
cc baked.c -o baked $CFLAGS # baked
|
cc $@ -o $* $CFLAGS # baked
|
||||||
:STOP
|
:STOP
|
||||||
*
|
*
|
||||||
* See install.sh for another example coded into a different language.
|
* See install.sh for another example coded into a different language.
|
||||||
@ -30,7 +30,7 @@
|
|||||||
* may not have multiline comments, so you may be restricted to a single line.
|
* may not have multiline comments, so you may be restricted to a single line.
|
||||||
*
|
*
|
||||||
* with the flag CFLAGS='-DSHAKE_COMPAT' Shake compatibility will be enabled,
|
* with the flag CFLAGS='-DSHAKE_COMPAT' Shake compatibility will be enabled,
|
||||||
* @COMPILECMD cc baked.c -o baked -std=gnu99 -O2 -Wall -Wextra -Wpedantic -pipe $CFLAGS # SHAKE_COMPAT enabled
|
* @COMPILECMD cc $@ -o $* -std=gnu99 -O2 -Wall -Wextra -Wpedantic -pipe $CFLAGS # SHAKE_COMPAT enabled
|
||||||
*
|
*
|
||||||
* TODO
|
* TODO
|
||||||
*
|
*
|
||||||
@ -59,7 +59,7 @@
|
|||||||
# define HELP \
|
# define HELP \
|
||||||
"target-file\n" \
|
"target-file\n" \
|
||||||
"Use the format `@COMPILECMD command ...\n' within the target-file\n"
|
"Use the format `@COMPILECMD command ...\n' within the target-file\n"
|
||||||
# define START "@COMPILECMD"
|
# define START "@COMPILECMD "
|
||||||
# define STOP "\n"
|
# define STOP "\n"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#EXEC:
|
SUDO=${SUDO:-sudo}
|
||||||
SUDO=${SUDO:-sudo}
|
cc baked.c -o baked -std=gnu99 -O2 -Wall -Wextra -Wpedantic -pipe $CFLAGS
|
||||||
cc baked.c -o baked -pipe -O2 -Wall -Wextra -Wpedantic -Wshadow -Wundef
|
$SUDO install -m 755 baked /usr/local/bin
|
||||||
$SUDO install -m 755 baked /usr/local/bin
|
|
||||||
#:STOP
|
|
||||||
|
Loading…
Reference in New Issue
Block a user