Skip to content

Commit f2bb32d

Browse files
committed
Un-break contrib install with llvm.
Apparently $(foreach ... $(call install_llvm_module,...)) doesn't work too well without a blank line ending the install_llvm_module macro. The previous coding hackishly dodged this problem with some parens, but that's not really a good solution because make misunderstands where the command boundaries are that way. Discussion: https://postgr.es/m/20180428073935.GB1736@paquier.xyz
1 parent bc19b78 commit f2bb32d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Makefile.global.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,12 +1019,15 @@ endif
10191019
#
10201020
# The many INSTALL_DATA invocations aren't particularly fast, it'd be
10211021
# good if we could coalesce them, but I didn't find a good way.
1022+
#
1023+
# Note: blank line at end of macro is necessary to let it be used in foreach
10221024
define install_llvm_module
10231025
$(MKDIR_P) '$(DESTDIR)${bitcodedir}/$(1)'
10241026
$(MKDIR_P) $(sort $(dir $(addprefix '$(DESTDIR)${bitcodedir}'/$(1)/, $(2))))
10251027
$(foreach obj, ${2}, $(INSTALL_DATA) $(patsubst %.o,%.bc, $(obj)) '$(DESTDIR)${bitcodedir}'/$(1)/$(dir $(obj))
10261028
)
10271029
cd '$(DESTDIR)${bitcodedir}' && $(LLVM_BINPATH)/llvm-lto -thinlto -thinlto-action=thinlink -o $(1).index.bc $(addprefix $(1)/,$(patsubst %.o,%.bc, $(2)))
1030+
10281031
endef
10291032

10301033
# Uninstall LLVM bitcode module.
@@ -1037,4 +1040,5 @@ endef
10371040
define uninstall_llvm_module
10381041
rm -rf '$(DESTDIR)${bitcodedir}/$(1)/'
10391042
rm -f '$(DESTDIR)${bitcodedir}/$(1).index.bc'
1043+
10401044
endef

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