diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2024-06-21 08:17:23 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2024-06-21 08:17:23 +0200 |
commit | 58445651dbc6182e1ff4100f6428ba6a261407f9 (patch) | |
tree | 3bac817f6f53f3b08f8b0574fd873ed4155e79d8 /src | |
parent | 02bbc3c83aec597e4b8c873916e9e29f3d02b132 (diff) | |
download | postgresql-58445651dbc6182e1ff4100f6428ba6a261407f9.tar.gz postgresql-58445651dbc6182e1ff4100f6428ba6a261407f9.zip |
Fix make build on MinGW
Revert a couple of the simplifications done in commit 721856ff24b
because platforms without ln -s, where LN_S='cp -pR', such as MinGW,
required the specific previous incantations.
Reported-by: Noah Misch <noah@leadboat.com>
Discussion: https://www.postgresql.org/message-id/20240616193448.28@rfd.leadboat.com
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/Makefile | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/backend/Makefile b/src/backend/Makefile index 6700aec0396..84302cc6dab 100644 --- a/src/backend/Makefile +++ b/src/backend/Makefile @@ -133,18 +133,24 @@ submake-utils-headers: # Make symlinks for these headers in the include directory. That way # we can cut down on the -I options. Also, a symlink is automatically # up to date when we update the base file. +# +# The point of the prereqdir incantation in some of the rules below is to +# force the symlink to use an absolute path rather than a relative path. +# This is needed to support platforms without ln -s. .PHONY: generated-headers generated-headers: $(top_builddir)/src/include/storage/lwlocknames.h $(top_builddir)/src/include/utils/wait_event_types.h submake-catalog-headers submake-nodes-headers submake-utils-headers parser/gram.h $(top_builddir)/src/include/storage/lwlocknames.h: storage/lmgr/lwlocknames.h - rm -f '$@' - $(LN_S) ../../backend/$< '$@' + prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \ + cd '$(dir $@)' && rm -f $(notdir $@) && \ + $(LN_S) "$$prereqdir/$(notdir $<)" . $(top_builddir)/src/include/utils/wait_event_types.h: utils/activity/wait_event_types.h - rm -f '$@' - $(LN_S) ../../backend/$< '$@' + prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \ + cd '$(dir $@)' && rm -f $(notdir $@) && \ + $(LN_S) "$$prereqdir/$(notdir $<)" . utils/probes.o: utils/probes.d $(SUBDIROBJS) $(DTRACE) $(DTRACEFLAGS) -C -G -s $(call expand_subsys,$^) -o $@ |