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
This commit is contained in:
ftasnetamot 2024-07-29 17:12:59 +02:00
parent 316e9a1863
commit 42abd602cf
3 changed files with 4 additions and 2 deletions

1
.gitignore vendored

@ -10,7 +10,6 @@ sslh-ev
systemd-sslh-generator systemd-sslh-generator
sslh.8.gz sslh.8.gz
tags tags
version.h
/config.status /config.status
/config.log /config.log
/config.h /config.h

@ -86,8 +86,9 @@ all: sslh-fork sslh-select $(MAN) echosrv $(CONDITIONAL_TARGETS)
$(OBJS_A): $(OBJS) $(OBJS_A): $(OBJS)
$(AR) rcs $(OBJS_A) $(OBJS) $(AR) rcs $(OBJS_A) $(OBJS)
version.h: version.h: .FORCE
./genver.sh >version.h ./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 $(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: clean:
rm -f sslh-fork sslh-select $(CONDITIONAL_TARGETS) echosrv version.h $(MAN) systemd-sslh-generator *.o *.gcov *.gcno *.gcda *.png *.html *.css *.info 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: tags:
ctags --globals -T *.[ch] ctags --globals -T *.[ch]

1
version.h Normal file

@ -0,0 +1 @@
// this is a placeholder for version.h, to make code-checking editors happy