Commit e0def77c authored by Michael Shigorin's avatar Michael Shigorin

pkg.in/*/Makefile: refactor using archdep-filter

Duplicating the architecture tag handling logic was afwul indeed; one-liner (well, two lines for readability) is not that bad at least, factoring it out wouldn't gain a lot. Fixes: 75735473
parent fab15ba7
......@@ -35,16 +35,9 @@ copy-groups:
@echo $(call groups2lists) \
| xargs -r -- cp --parents -at $(TARGET) --
grep-archdep: a = $(ARCH)
grep-archdep:
@# xargs -L 1024 -n 1024 ? -- breaks -I
@find $(TARGET) -type f \
| xargs -I '__' sh -c '\
sed -ri "s/\\<([^@ ]*)@X86\\>/\\1@i586 \\1@x86_64/g" __; \
sed -ri "s/\\<([^@ ]*)@IA32\\>/\\1@i586 i586-\\1@x86_64/g" __;\
sed -rni "s/\\<([^@ ]*)\\>|\\<([^@ ]*)@$a\\>/\\1\\2/pg" __; \
sed -ri "s/\\<([^@ ]*)@[^@ ]+\\> *//g" __; \
sed -ri "s/^ +//;s/ +$$//" __'
| xargs -r -I __ -- archdep-filter -a "$(ARCH)" -i __
# do beforehand as foreach gets expanded before recipe execution
$(TARGET):
......
......@@ -18,16 +18,9 @@ copy-profiles:
$(addsuffix .directory,$(THE_PROFILES)); \
fi
### exact copy of a snippet from ../lists/Makefile
grep-archdep: a = $(ARCH)
grep-archdep:
@# xargs -L 1024 -n 1024 ? -- breaks -I
@find $(TARGET) -type f \
| xargs -I '__' sh -c '\
sed -ri "s/\\<([^@ ]*)@X86\\>/\\1@i586 \\1@x86_64/g" __; \
sed -ri "s/\\<([^@ ]*)@IA32\\>/\\1@i586 i586-\\1@x86_64/g" __;\
sed -rni "s/\\<([^@ ]*)\\>|\\<([^@ ]*)@$a\\>/\\1\\2/pg" __; \
sed -ri "s/\\<([^@ ]*)@[^@ ]+\\> *//g" __'
| xargs -r -I __ -- archdep-filter -a "$(ARCH)" -i __
$(TARGET):
@mkdir -p $(TARGET)
......
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