add config.h
This commit is contained in:
parent
c9b95a64d2
commit
39e27a03dd
24
bake.c
24
bake.c
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Licensed under the GNU Public License version 3 only, see LICENSE.
|
* 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
|
#define _POSIX_C_SOURCE 200809L
|
||||||
@ -22,29 +22,11 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
/* Require space after START */
|
#include "config.h"
|
||||||
#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
|
|
||||||
|
|
||||||
#define START "@BAKE"
|
#define START "@BAKE"
|
||||||
#define STOP "@STOP"
|
#define STOP "@STOP"
|
||||||
|
|
||||||
#define HELP \
|
#define HELP \
|
||||||
BOLD "target-file" RESET " [arguments ...]\n" \
|
BOLD "target-file" RESET " [arguments ...]\n" \
|
||||||
"Use the format `" BOLD "@BAKE" RESET " cmd ...' within the target-file, this will execute the\n" \
|
"Use the format `" BOLD "@BAKE" RESET " cmd ...' within the target-file, this will execute the\n" \
|
||||||
|
20
config.h
Normal file
20
config.h
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user