From 42abd602cfa0795e92bca317e564d7ae18a9311a Mon Sep 17 00:00:00 2001 From: ftasnetamot Date: Mon, 29 Jul 2024 17:12:59 +0200 Subject: [PATCH] include version.h in repo Many code checking editors, marking the common.h as erroneous, as version.h is missing. This can lead to confusion. Change in Makefile.in with fake empty dependency ensures, that version.h is recreated at every "make" Another change in make clean, makes sure, that at this point a stub version.h is generated. version.h removed from .gitignore --- .gitignore | 1 - Makefile.in | 4 +++- version.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 version.h diff --git a/.gitignore b/.gitignore index 493642b..6b9d908 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ sslh-ev systemd-sslh-generator sslh.8.gz tags -version.h /config.status /config.log /config.h diff --git a/Makefile.in b/Makefile.in index 57cf591..9a0e157 100644 --- a/Makefile.in +++ b/Makefile.in @@ -86,8 +86,9 @@ all: sslh-fork sslh-select $(MAN) echosrv $(CONDITIONAL_TARGETS) $(OBJS_A): $(OBJS) $(AR) rcs $(OBJS_A) $(OBJS) -version.h: +version.h: .FORCE ./genver.sh >version.h +.FORCE: $(OBJS) $(FORK_OBJS) $(SELECT_OBJS) $(EV_OBJS): argtable3.h collection.h common.h gap.h hash.h log.h probe.h processes.h sslh-conf.h tcp-listener.h tcp-probe.h tls.h udp-listener.h version.h @@ -160,6 +161,7 @@ distclean: clean clean: rm -f sslh-fork sslh-select $(CONDITIONAL_TARGETS) echosrv version.h $(MAN) systemd-sslh-generator *.o *.gcov *.gcno *.gcda *.png *.html *.css *.info + echo "// this is a placeholder for version.h, to make code-checking editors happy" > version.h tags: ctags --globals -T *.[ch] diff --git a/version.h b/version.h new file mode 100644 index 0000000..ae9c24a --- /dev/null +++ b/version.h @@ -0,0 +1 @@ +// this is a placeholder for version.h, to make code-checking editors happy