Skip to content

Commit d4b1835

Browse files
committed
Fix generation of commit_id.h when source is compiled directly from git
1 parent 2dffdce commit d4b1835

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Makefile.global.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,8 @@ endif # enable_nls
836836

837837
.PHONY: $(top_builddir)/src/include/commit_id.h
838838
$(top_builddir)/src/include/commit_id.h:
839-
[ -d .git ] && git log -1 --format='#define COMMIT_ID "%h"' > $@.tmp && mv $@.tmp $@
839+
-[ -e $(top_srcdir)/src/include/commit_id.h ] && cp $(top_srcdir)/src/include/commit_id.h $@
840+
-[ -d $(top_srcdir)/.git ] && git log -1 --format='#define COMMIT_ID "%h"' > $@.tmp && mv $@.tmp $@
840841
[ -e $@ ] || echo '#define COMMIT_ID "00000000"' >$@
841842

842843
##########################################################################

src/backend/utils/adt/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,6 @@ like.o: like.c like_match.c
3535

3636
varlena.o: varlena.c levenshtein.c
3737

38+
version.o: version.c $(top_builddir)/src/include/commit_id.h
39+
3840
include $(top_srcdir)/src/backend/common.mk

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy