Replace nop hack, explain substitution reasoning
This commit is contained in:
parent
b1e9ed3c19
commit
fca66702a4
|
@ -30,32 +30,33 @@ DEFAULT_PREPARE_MAN_CMD = install -m644
|
||||||
# Create a directory
|
# Create a directory
|
||||||
# $(1) is the directory
|
# $(1) is the directory
|
||||||
#
|
#
|
||||||
# Gee, what's up with that $(nop)? See comment below.
|
# XXX: These defines are called to generate make steps.
|
||||||
|
# Adding blank lines means two steps from different defines will not end up on
|
||||||
|
# the same line.
|
||||||
define PREPARE_DIR
|
define PREPARE_DIR
|
||||||
$(nop)
|
|
||||||
@$(call E, prepare: $(1))
|
@$(call E, prepare: $(1))
|
||||||
$(Q)$(PREPARE_DIR_CMD) $(1)
|
$(Q)$(PREPARE_DIR_CMD) $(1)
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Copy an executable
|
# Copy an executable
|
||||||
# $(1) is the filename/libname-glob
|
# $(1) is the filename/libname-glob
|
||||||
#
|
#
|
||||||
# Gee, what's up with that $(nop)? See comment below.
|
# See above for an explanation on the surrounding blank lines
|
||||||
define PREPARE_BIN
|
define PREPARE_BIN
|
||||||
$(nop)
|
|
||||||
@$(call E, prepare: $(PREPARE_DEST_BIN_DIR)/$(1))
|
@$(call E, prepare: $(PREPARE_DEST_BIN_DIR)/$(1))
|
||||||
$(Q)$(PREPARE_BIN_CMD) $(PREPARE_SOURCE_BIN_DIR)/$(1) $(PREPARE_DEST_BIN_DIR)/$(1)
|
$(Q)$(PREPARE_BIN_CMD) $(PREPARE_SOURCE_BIN_DIR)/$(1) $(PREPARE_DEST_BIN_DIR)/$(1)
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Copy a dylib or rlib
|
# Copy a dylib or rlib
|
||||||
# $(1) is the filename/libname-glob
|
# $(1) is the filename/libname-glob
|
||||||
#
|
#
|
||||||
# XXX: Don't remove the $(nop) command below!
|
# See above for an explanation on the surrounding blank lines
|
||||||
# Yeah, that's right, it's voodoo. Something in the way this macro is being expanded
|
|
||||||
# causes it to parse incorrectly. Throwing in that empty command seems to fix the
|
|
||||||
# problem. I'm sorry, just don't remove the $(nop), alright?
|
|
||||||
define PREPARE_LIB
|
define PREPARE_LIB
|
||||||
$(nop)
|
|
||||||
@$(call E, prepare: $(PREPARE_WORKING_DEST_LIB_DIR)/$(1))
|
@$(call E, prepare: $(PREPARE_WORKING_DEST_LIB_DIR)/$(1))
|
||||||
$(Q)LIB_NAME="$(notdir $(lastword $(wildcard $(PREPARE_WORKING_SOURCE_LIB_DIR)/$(1))))"; \
|
$(Q)LIB_NAME="$(notdir $(lastword $(wildcard $(PREPARE_WORKING_SOURCE_LIB_DIR)/$(1))))"; \
|
||||||
MATCHES="$(filter-out %$(notdir $(lastword $(wildcard $(PREPARE_WORKING_SOURCE_LIB_DIR)/$(1)))), \
|
MATCHES="$(filter-out %$(notdir $(lastword $(wildcard $(PREPARE_WORKING_SOURCE_LIB_DIR)/$(1)))), \
|
||||||
|
@ -67,16 +68,18 @@ define PREPARE_LIB
|
||||||
echo $$MATCHES ; \
|
echo $$MATCHES ; \
|
||||||
fi
|
fi
|
||||||
$(Q)$(PREPARE_LIB_CMD) `ls -drt1 $(PREPARE_WORKING_SOURCE_LIB_DIR)/$(1)` $(PREPARE_WORKING_DEST_LIB_DIR)/
|
$(Q)$(PREPARE_LIB_CMD) `ls -drt1 $(PREPARE_WORKING_SOURCE_LIB_DIR)/$(1)` $(PREPARE_WORKING_DEST_LIB_DIR)/
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Copy a man page
|
# Copy a man page
|
||||||
# $(1) - source dir
|
# $(1) - source dir
|
||||||
#
|
#
|
||||||
# Gee, what's up with that $(nop)? See comment above.
|
# See above for an explanation on the surrounding blank lines
|
||||||
define PREPARE_MAN
|
define PREPARE_MAN
|
||||||
$(nop)
|
|
||||||
@$(call E, prepare: $(PREPARE_DEST_MAN_DIR)/$(1))
|
@$(call E, prepare: $(PREPARE_DEST_MAN_DIR)/$(1))
|
||||||
$(Q)$(PREPARE_MAN_CMD) $(PREPARE_SOURCE_MAN_DIR)/$(1) $(PREPARE_DEST_MAN_DIR)/$(1)
|
$(Q)$(PREPARE_MAN_CMD) $(PREPARE_SOURCE_MAN_DIR)/$(1) $(PREPARE_DEST_MAN_DIR)/$(1)
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
PREPARE_TOOLS = $(filter-out compiletest rustbook error-index-generator, $(TOOLS))
|
PREPARE_TOOLS = $(filter-out compiletest rustbook error-index-generator, $(TOOLS))
|
||||||
|
|
Loading…
Reference in New Issue