чување 1cf23f4eb4165b9d3a1d029e378331bcbe4358df
родитељ b062c0fe86faaae40f988f4e6866fed4de549bd8
Аутор: Страхиња Радић <contact@strahinja.org>
Датум: Sun, 12 Mar 2023 22:58:13 +0100
Solve config.h support by redo
Signed-off-by: Страхиња Радић <contact@strahinja.org>
Diffstat:
измењених датотека: 5, додавања: 11(+), брисања: 4(-)
diff --git a/.gitignore b/.gitignore
@@ -21,6 +21,7 @@ nohup.out
*.pkg.tar.zst
src
PKGBUILD
+_config.h
config.h
sled
sled.1
diff --git a/_config.h.do b/_config.h.do
@@ -0,0 +1,7 @@
+hfile=${1#_}
+if [ ! -r $hfile ]; then
+ cat config.def.h >$hfile
+fi
+cat $hfile >$3
+redo-always
+redo-stamp <$3
diff --git a/config.h.do b/config.h.do
@@ -1 +0,0 @@
-cat config.def.h >$3
diff --git a/draw.c b/draw.c
@@ -12,7 +12,7 @@
#include "version.h"
#include "util.h"
#include "draw.h"
-#include "config.h"
+#include "_config.h"
/* clang-format off */
static const char* help_title = "sled help";
diff --git a/sled.c b/sled.c
@@ -20,12 +20,12 @@
#define SLED_C_GLOBALS
#define ONLY_DEFS
-#include "config.h"
+#include "_config.h"
#include "version.h"
#include "util.h"
#include "draw.h"
#undef ONLY_DEFS
-#include "config.h"
+#include "_config.h"
#define SEL_NOT_EMPTY(state) \
((state->sel_start.row != state->sel_end.row) \