Commit a86dd0c4 authored by Michael Shigorin's avatar Michael Shigorin

pkg/lists: uncrustify Makefile

The problem with the changed piece of code is that it would - both call cp(1) multiple times if multiple *_LIST variables were non-empty (which is usually the case), and - try to evaluate stdout of the called commands as a shell script (which would be empty unless someone passed e.g. -v to that cp(1) but it's crazy to rely on things like this). So the functions should prepare arguments for a single copy command that is predictable and could be made verbose. Ouch.
parent dc679621
...@@ -21,12 +21,12 @@ TARGET := $(BUILDDIR)/$(SUFFIX) ...@@ -21,12 +21,12 @@ TARGET := $(BUILDDIR)/$(SUFFIX)
all: $(TARGET) $(GLOBAL_DEBUG) $(DOTBASE) copy-lists copy-groups all: $(TARGET) $(GLOBAL_DEBUG) $(DOTBASE) copy-lists copy-groups
@mp-commit "$(TARGET)" "requested $(SUFFIX) copied over" @mp-commit "$(TARGET)" "requested $(SUFFIX) copied over"
# env | sort -u | grep _LISTS | xargs cp
copy-lists: copy-lists:
@# env | sort -u | grep _LISTS | xargs cp @cp --parents -at $(TARGET) -- \
@$(foreach V, \ $(foreach V, \
$(filter %_LISTS,$(sort $(.VARIABLES))), \ $(filter %_LISTS,$(sort $(.VARIABLES))), \
$(if $(filter environment% file,$(origin $V)),\ $(if $(filter environment% file,$(origin $V)),$($V)))
$(shell cp --parents -at $(TARGET) -- $($V))))
copy-groups: copy-groups:
@if [ -n "$(THE_GROUPS)$(MAIN_GROUPS)" ]; then \ @if [ -n "$(THE_GROUPS)$(MAIN_GROUPS)" ]; then \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment