Skip to content

Commit bc19b78

Browse files
committed
Minor cleanups for install_llvm_module/uninstall_llvm_module Make macros.
Don't put comments inside the macros, per complaint from Michael Paquier. Quote target directory path with single quotes, not double; that seems to be our project standard. Not quoting it at all definitely isn't per standard. Remove excess slash in one instance of path. Remove useless semicolon. Discussion: https://postgr.es/m/20180428073935.GB1736@paquier.xyz
1 parent 4094031 commit bc19b78

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/Makefile.global.in

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,19 +1017,14 @@ endif
10171017
# $(1) name of the module (e.g. an extension's name or postgres for core code)
10181018
# $(2) source objects, with .o suffix
10191019
#
1020-
define install_llvm_module
1021-
# Create target directory
1022-
$(MKDIR_P) "$(DESTDIR)${bitcodedir}/$(1)"
1023-
# Create sub-directories, if files are in subdirectories
1024-
$(MKDIR_P) $(sort $(dir $(addprefix $(DESTDIR)${bitcodedir}/$(1)/, $(2))))
1025-
# Then install files
1026-
#
10271020
# The many INSTALL_DATA invocations aren't particularly fast, it'd be
10281021
# good if we could coalesce them, but I didn't find a good way.
1029-
$(foreach obj, ${2}, $(INSTALL_DATA) $(patsubst %.o,%.bc, $(obj)) $(DESTDIR)/${bitcodedir}/$(1)/$(dir $(obj));
1022+
define install_llvm_module
1023+
$(MKDIR_P) '$(DESTDIR)${bitcodedir}/$(1)'
1024+
$(MKDIR_P) $(sort $(dir $(addprefix '$(DESTDIR)${bitcodedir}'/$(1)/, $(2))))
1025+
$(foreach obj, ${2}, $(INSTALL_DATA) $(patsubst %.o,%.bc, $(obj)) '$(DESTDIR)${bitcodedir}'/$(1)/$(dir $(obj))
10301026
)
1031-
# and generate index
1032-
(cd "$(DESTDIR)${bitcodedir}" && $(LLVM_BINPATH)/llvm-lto -thinlto -thinlto-action=thinlink -o $(1).index.bc $(addprefix $(1)/,$(patsubst %.o,%.bc, $(2))))
1027+
cd '$(DESTDIR)${bitcodedir}' && $(LLVM_BINPATH)/llvm-lto -thinlto -thinlto-action=thinlink -o $(1).index.bc $(addprefix $(1)/,$(patsubst %.o,%.bc, $(2)))
10331028
endef
10341029

10351030
# Uninstall LLVM bitcode module.
@@ -1040,6 +1035,6 @@ endef
10401035
# This intentionally doesn't use the explicit installed file list,
10411036
# seems too likely to change regularly.
10421037
define uninstall_llvm_module
1043-
rm -rf "$(DESTDIR)${bitcodedir}/$(1)/"
1044-
rm -f "$(DESTDIR)${bitcodedir}/$(1).index.bc"
1038+
rm -rf '$(DESTDIR)${bitcodedir}/$(1)/'
1039+
rm -f '$(DESTDIR)${bitcodedir}/$(1).index.bc'
10451040
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