File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -133,18 +133,24 @@ submake-utils-headers:
133133# Make symlinks for these headers in the include directory. That way
134134# we can cut down on the -I options. Also, a symlink is automatically
135135# up to date when we update the base file.
136+ #
137+ # The point of the prereqdir incantation in some of the rules below is to
138+ # force the symlink to use an absolute path rather than a relative path.
139+ # This is needed to support platforms without ln -s.
136140
137141.PHONY : generated-headers
138142
139143generated-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
140144
141145$(top_builddir ) /src/include/storage/lwlocknames.h : storage/lmgr/lwlocknames.h
142- rm -f ' $@'
143- $(LN_S ) ../../backend/$< ' $@'
146+ prereqdir=` cd ' $(dir $<)' > /dev/null && pwd` && \
147+ cd ' $(dir $@)' && rm -f $(notdir $@ ) && \
148+ $(LN_S ) " $$ prereqdir/$( notdir $< ) " .
144149
145150$(top_builddir ) /src/include/utils/wait_event_types.h : utils/activity/wait_event_types.h
146- rm -f ' $@'
147- $(LN_S ) ../../backend/$< ' $@'
151+ prereqdir=` cd ' $(dir $<)' > /dev/null && pwd` && \
152+ cd ' $(dir $@)' && rm -f $(notdir $@ ) && \
153+ $(LN_S ) " $$ prereqdir/$( notdir $< ) " .
148154
149155utils/probes.o : utils/probes.d $(SUBDIROBJS )
150156 $(DTRACE ) $(DTRACEFLAGS ) -C -G -s $(call expand_subsys,$^ ) -o $@
You can’t perform that action at this time.
0 commit comments