]> git.xolatile.top Git - emil-bake.git/commitdiff
Minor fix to shake build
authorEmil <emilwilliams@tuta.io>
Wed, 27 Sep 2023 05:46:28 +0000 (05:46 +0000)
committerEmil <emilwilliams@tuta.io>
Wed, 27 Sep 2023 05:46:28 +0000 (05:46 +0000)
README
baked.c
install.sh

diff --git a/README b/README
index 3a6f29aa9fd403f2519f3c22b54ed5bae55ca1d6..4b86697dea497c80cb04e293cbbcc8b8685bfe42 100644 (file)
--- a/README
+++ b/README
@@ -4,9 +4,9 @@ Simply embed EXEC: and :STOP into any file and it'll run just fine, example:
 
 EXEC:shell command ...:STOP
 
-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
-be fairly flexible, especially when multi-line comments are available.
+you may see a real example in the primary and only source file: `baked.c'.
+this is not targeted toward any language and should be fairly flexible,
+especially when multi-line comments are available.
 
 Name/arg extension:
 
diff --git a/baked.c b/baked.c
index 0a5b937e64767f0e617a466efb644dc46d3bfb43..817956c265959953becad15271a0fc5346324a4b 100644 (file)
--- a/baked.c
+++ b/baked.c
  *
  * 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.
  *
  * Another (functional) example:
  EXEC:
  CFLAGS='-std=gnu99 -O2 -Wall -Wextra -Wpedantic -pipe'
- cc baked.c -o baked $CFLAGS # baked
+ cc $@ -o $* $CFLAGS # baked
  :STOP
  *
  * 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.
  *
  * 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
  *
@@ -59,7 +59,7 @@
 # define HELP                                                       \
   "target-file\n"                                                   \
   "Use the format `@COMPILECMD command ...\n' within the target-file\n"
-# define START "@COMPILECMD"
+# define START "@COMPILECMD "
 # define STOP "\n"
 #endif
 
index 69f0b4daa84363703872c0c5c9bb54f935354148..44aaf3cabdb1417772b25ffa748a7ab8dbd0dd40 100755 (executable)
@@ -1,6 +1,4 @@
 #!/bin/sh
-#EXEC:
-  SUDO=${SUDO:-sudo}
-  cc baked.c -o baked -pipe -O2 -Wall -Wextra -Wpedantic -Wshadow -Wundef
-  $SUDO install -m 755 baked /usr/local/bin
-#:STOP
+SUDO=${SUDO:-sudo}
+cc baked.c -o baked -std=gnu99 -O2 -Wall -Wextra -Wpedantic -pipe $CFLAGS
+$SUDO install -m 755 baked /usr/local/bin