]> git.xolatile.top Git - emil-bake.git/commitdiff
add config.h
authorEmil Williams <emilwilliams@tuta.io>
Fri, 19 Jan 2024 21:04:32 +0000 (21:04 +0000)
committerEmil Williams <emilwilliams@tuta.io>
Fri, 19 Jan 2024 21:04:32 +0000 (21:04 +0000)
bake.c
config.h [new file with mode: 0644]

diff --git a/bake.c b/bake.c
index 91ae59c520d5323b947cc33a45c31707e3b82953..0eda86aba9b11845cc04127685c6bdebd60ba8fe 100644 (file)
--- a/bake.c
+++ b/bake.c
@@ -3,7 +3,7 @@
  *
  * Licensed under the GNU Public License version 3 only, see LICENSE.
  *
- * @BAKE cc -std=c89 -O2 $@ -o $* $+ # @STOP
+ * @BAKE cc -std=c89 -O2 -I. $@ -o $* $+ # @STOP
  */
 
 #define _POSIX_C_SOURCE 200809L
 #include <sys/stat.h>
 #include <unistd.h>
 
-/* Require space after START */
-#define REQUIRE_SPACE
-/* Enable colors */
-#define COLOR
-
-#ifdef COLOR
-#define    RED "\e[91m"
-#define  GREEN "\e[92m"
-#define YELLOW "\e[93m"
-#define    DIM "\e[2m"
-#define   BOLD "\e[1m"
-#define  RESET "\e[0m"
-#else
-#define    RED
-#define  GREEN
-#define YELLOW
-#define    DIM
-#define   BOLD
-#define  RESET
-#endif
+#include "config.h"
 
 #define START "@BAKE"
 #define  STOP "@STOP"
+
 #define  HELP                                                                          \
     BOLD "target-file" RESET " [arguments ...]\n"                                      \
     "Use the format `" BOLD "@BAKE" RESET " cmd ...' within the target-file, this will execute the\n"   \
diff --git a/config.h b/config.h
new file mode 100644 (file)
index 0000000..ac0d3fb
--- /dev/null
+++ b/config.h
@@ -0,0 +1,20 @@
+/* Require space after START */
+#define REQUIRE_SPACE
+
+#define ENABLE_COLOR
+
+#ifdef ENABLE_COLOR
+# define    RED "\e[91m"
+# define  GREEN "\e[92m"
+# define YELLOW "\e[93m"
+# define    DIM "\e[2m"
+# define   BOLD "\e[1m"
+# define  RESET "\e[0m"
+#else
+# define    RED
+# define  GREEN
+# define YELLOW
+# define    DIM
+# define   BOLD
+# define  RESET
+#endif