@@ -29,30 +29,34 @@ DEFAULT_PREPARE_MAN_CMD = install -m644
2929
3030# Create a directory
3131# $(1) is the directory
32+ #
33+ # XXX: These defines are called to generate make steps.
34+ # Adding blank lines means two steps from different defines will not end up on
35+ # the same line.
3236define PREPARE_DIR
33- @$(Q )$(call E, prepare: $(1 ) )
37+
38+ @$(call E, prepare: $(1 ) )
3439 $(Q )$(PREPARE_DIR_CMD ) $(1 )
40+
3541endef
3642
3743# Copy an executable
3844# $(1) is the filename/libname-glob
3945#
40- # Gee, what's up with that $(nop)? See comment below.
46+ # See above for an explanation on the surrounding blank lines
4147define PREPARE_BIN
42- $( nop )
48+
4349 @$(call E, prepare: $(PREPARE_DEST_BIN_DIR ) /$(1 ) )
4450 $(Q )$(PREPARE_BIN_CMD ) $(PREPARE_SOURCE_BIN_DIR ) /$(1 ) $(PREPARE_DEST_BIN_DIR ) /$(1 )
51+
4552endef
4653
4754# Copy a dylib or rlib
4855# $(1) is the filename/libname-glob
4956#
50- # XXX: Don't remove the $(nop) command below!
51- # Yeah, that's right, it's voodoo. Something in the way this macro is being expanded
52- # causes it to parse incorrectly. Throwing in that empty command seems to fix the
53- # problem. I'm sorry, just don't remove the $(nop), alright?
57+ # See above for an explanation on the surrounding blank lines
5458define PREPARE_LIB
55- $( nop )
59+
5660 @$(call E, prepare: $(PREPARE_WORKING_DEST_LIB_DIR ) /$(1 ) )
5761 $(Q ) LIB_NAME="$(notdir $(lastword $(wildcard $(PREPARE_WORKING_SOURCE_LIB_DIR ) /$(1 ) ) ) ) "; \
5862 MATCHES="$(filter-out % $(notdir $(lastword $(wildcard $(PREPARE_WORKING_SOURCE_LIB_DIR ) /$(1 ) ) ) ) , \
@@ -64,13 +68,18 @@ define PREPARE_LIB
6468 echo $$MATCHES ; \
6569 fi
6670 $(Q )$(PREPARE_LIB_CMD ) `ls -drt1 $(PREPARE_WORKING_SOURCE_LIB_DIR ) /$(1 ) ` $(PREPARE_WORKING_DEST_LIB_DIR ) /
71+
6772endef
6873
6974# Copy a man page
7075# $(1) - source dir
76+ #
77+ # See above for an explanation on the surrounding blank lines
7178define PREPARE_MAN
79+
7280 @$(call E, prepare: $(PREPARE_DEST_MAN_DIR ) /$(1 ) )
7381 $(Q )$(PREPARE_MAN_CMD ) $(PREPARE_SOURCE_MAN_DIR ) /$(1 ) $(PREPARE_DEST_MAN_DIR ) /$(1 )
82+
7483endef
7584
7685PREPARE_TOOLS = $(filter-out compiletest rustbook error-index-generator, $(TOOLS ) )
0 commit comments