From: Prarit Bhargava <prarit(a)redhat.com>
redhat/Makefile: Fix dist-dump-variables target
The existing dist-dump-variables didn't output all the variables. Fix the
target so that it outputs all the Makefile variables.
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -162,9 +162,6 @@ dist-clean-rpmdirs:
rm -rf $$i; \
done;
-dist-clean-scripts:
- @rm -f dist-dump-variables.sh
-
dist-clean: dist-clean-sources dist-clean-configs dist-clean-rpmdirs dist-clean-scripts
dist-stub-key:
@@ -437,12 +434,8 @@ dist-get-latest:
dist-os-version:
@echo "OSVERSION: $(RHEL_MAJOR).$(RHEL_MINOR)"
-.EXPORT_ALL_VARIABLES:
-.PHONY: dist-dump-variables
dist-dump-variables:
- grep -h "^[ ]*[a-zA-Z_][a-zA-Z_0-9]*[ ]*[:?]*=" $(REDHAT)/Makefile.common
$(REDHAT)/Makefile $(TOPDIR)/Makefile.rhelver | sed -e 's/[
]*\([a-zA-Z_][a-zA-Z_0-9]*\).*/echo "\1=$$\1"/' | sort | uniq >
dist-dump-variables.sh
- chmod +x $(REDHAT)/dist-dump-variables.sh
- @$(REDHAT)/dist-dump-variables.sh
+ @$(foreach V,$(sort $(.VARIABLES)), $(if $(filter-out environment% default automatic,
$(origin $V)),$(info $V=$($V) )))
dist-self-test:
@if test -x /usr/bin/bats; then \
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1625