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: 7573547328
This commit is contained in:
parent
fab15ba7a8
commit
e0def77ca8
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user