чување 65864da10b75829f0341567d4d3b38b9b1f147e5
родитељ 66d4f5d149add8793a4d5fefba3c0d130990cefd
Аутор: Страхиња Радић <contact@strahinja.org>
Датум: Mon, 11 Mar 2024 18:59:32 +0100
Change the output of make
Signed-off-by: Страхиња Радић <contact@strahinja.org>
Diffstat:
измењених датотека: 3, додавања: 11(+), брисања: 5(-)
diff --git a/Makefile b/Makefile
@@ -3,15 +3,15 @@ include config.mk
.SUFFIXES: .1.in .1 .def.h .h.in .h .c .o
.1.in.1:
- sh -x lib/replacepat $< $@
+ sh lib/replacepat $< $@
.h.in.h:
- sh -x lib/replacepat $< $@
+ sh lib/replacepat $< $@
all: $(PROG) $(MANPAGE) makedate makeversion
config.h: config.def.h
- [ ! -r config.h ] && cp config.def.h config.h || true
+ cp config.def.h config.h
date:
sh lib/makedate
@@ -20,10 +20,10 @@ version:
sh lib/makeversion
makedate:
- sh lib/makedate
+ sh lib/makedate -l
makeversion:
- sh lib/makeversion
+ sh lib/makeversion -l
poe.o: poe.c config.h draw.h po.h termbox.h util.h version.h
diff --git a/lib/makedate b/lib/makedate
@@ -28,3 +28,6 @@ if [ -f date ]; then
else
mv date.new date
fi
+if [ "$1" = "-l" ]; then
+ printf "DATE=\"%s\"\n" "$(cat date)"
+fi
diff --git a/lib/makeversion b/lib/makeversion
@@ -26,3 +26,6 @@ if [ -f version ]; then
else
mv version.new version
fi
+if [ "$1" = "-l" ]; then
+ printf "VERSION=\"%s\"\n" "$(cat version)"
+fi