From e0def77ca84b9cecb89896d4a4077e0b15c0b71c Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Wed, 23 Oct 2019 14:51:57 +0300 Subject: [PATCH] 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: 757354732858e7da20aa9cdaabd4b20f7656e029 --- pkg.in/lists/Makefile | 9 +-------- pkg.in/profiles/Makefile | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/pkg.in/lists/Makefile b/pkg.in/lists/Makefile index 1be3792f..1a2e7a7a 100644 --- a/pkg.in/lists/Makefile +++ b/pkg.in/lists/Makefile @@ -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): diff --git a/pkg.in/profiles/Makefile b/pkg.in/profiles/Makefile index 52514365..38899ef6 100644 --- a/pkg.in/profiles/Makefile +++ b/pkg.in/profiles/Makefile @@ -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)