From 1d56c2712bde8ca43a0ea8e400c193dc3d0ce9e5 Mon Sep 17 00:00:00 2001 From: Lizzy Fleckenstein Date: Thu, 21 Dec 2023 02:30:53 +0100 Subject: use .version-VERSION instead of version.VERSION.c --- .gitignore | 2 +- Makefile | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 6132154..dce403a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,8 @@ *.img *.map *.dis.asm +.version-* bx_enh_dbg.ini stage3/isr.asm fs.tar stage3/version.c -stage3/version.*.c diff --git a/Makefile b/Makefile index ee856d0..76ad53c 100644 --- a/Makefile +++ b/Makefile @@ -68,11 +68,11 @@ stage3/%.o: stage3/%.c GIT_VERSION := $(shell git describe --tags 2>/dev/null || git rev-parse --short HEAD) -stage3/version.c: stage3/version.$(GIT_VERSION).c - cp $< $@ +.version-$(GIT_VERSION): + rm -f .version-* + touch $@ -stage3/version.$(GIT_VERSION).c: - rm -f stage3/version.*.c +stage3/version.c: .version-$(GIT_VERSION) echo -e "#include \"def.h\"\nstr version = S(\"$(GIT_VERSION)\");" > $@ stage3/isr.asm: stage3/isr.lua @@ -96,7 +96,7 @@ qemu_slow: cuddles.img run: qemu clean: - rm -rf stage3/*.o *.bin *.img stage3/{isr.asm,version.c,version.*.c} fs.tar fs/dbg + rm -rf .version-* stage3/*.o *.bin *.img stage3/{isr.asm,version.c} fs.tar fs/dbg flash: cuddles.img dd if=cuddles.img of=$(DEV) -- cgit v1.2.3