чување b64e992362f499c6d17b5f2b73b99cd8da38af51
родитељ 65864da10b75829f0341567d4d3b38b9b1f147e5
Аутор: Страхиња Радић <contact@strahinja.org>
Датум: Mon, 11 Mar 2024 19:03:29 +0100
Repeat the make process if there was a change in date or version; add
_DEFAULT_SOURCE for termbox.h
Signed-off-by: Страхиња Радић <contact@strahinja.org>
Diffstat:
измењених датотека: 4, додавања: 9(+), брисања: 4(-)
diff --git a/Makefile b/Makefile
@@ -9,6 +9,7 @@ include config.mk
sh lib/replacepat $< $@
all: $(PROG) $(MANPAGE) makedate makeversion
+ if [ -f .rebuild ]; then rm .rebuild; make -e all; else true; fi
config.h: config.def.h
cp config.def.h config.h
diff --git a/config.mk b/config.mk
@@ -1,9 +1,9 @@
CC = cc
-CFLAGS = -g -Wall -pedantic -std=c99 -D_POSIX_C_SOURCE=200809L \
- -D_XOPEN_SOURCE=700
+CFLAGS = -g -Wall -pedantic -std=c99 -D_DEFAULT_SOURCE \
+ -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700
# OpenBSD
-#CFLAGS = -g -Wall -pedantic -std=c99 -D_POSIX_C_SOURCE=200809L \
-# -D_XOPEN_SOURCE=700 -D_BSD_SOURCE
+#CFLAGS = -g -Wall -pedantic -std=c99 -D_DEFAULT_SOURCE \
+# -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_BSD_SOURCE
INSTALL = install
LIBS =
SRC = draw.c po.c poe.c strlcat.c strlcpy.c util.c
diff --git a/lib/makedate b/lib/makedate
@@ -24,9 +24,11 @@ if [ -f date ]; then
rm date.new
else
mv date.new date
+ touch .rebuild
fi
else
mv date.new date
+ touch .rebuild
fi
if [ "$1" = "-l" ]; then
printf "DATE=\"%s\"\n" "$(cat date)"
diff --git a/lib/makeversion b/lib/makeversion
@@ -22,9 +22,11 @@ if [ -f version ]; then
rm version.new
else
mv version.new version
+ touch .rebuild
fi
else
mv version.new version
+ touch .rebuild
fi
if [ "$1" = "-l" ]; then
printf "VERSION=\"%s\"\n" "$(cat version)"