From c9dd74fd2bc7576d38fb8beee6631bde225f6188 Mon Sep 17 00:00:00 2001
From: Marcel Telka <marcel@telka.sk>
Date: Tue, 31 Oct 2023 07:54:37 +0100
Subject: [PATCH] make-rules: drop COMPONENT_AUTOGEN_MANIFEST support

---
 make-rules/ips.mk                 |   28 ----------------------------
 doc/building-and-packaging-faq.md |    8 --------
 2 files changed, 0 insertions(+), 36 deletions(-)

diff --git a/doc/building-and-packaging-faq.md b/doc/building-and-packaging-faq.md
index 742ec51..a34e194 100644
--- a/doc/building-and-packaging-faq.md
+++ b/doc/building-and-packaging-faq.md
@@ -6,7 +6,6 @@
 * [Why compiled python files are no longer automatically added to manifests?](#why-compiled-python-files-are-no-longer-automatically-added-to-manifests)
 * [How can I use COMPONENT_SUMMARY with PYVER components?](#how-can-i-use-component_summary-with-pyver-components)
 * [Why do I receive "mv: cannot access .deps/libsomething.Tpo" error during component build?](#why-do-i-receive-mv-cannot-access-depslibsomethingtpo-error-during-component-build)
-* [Why COMPONENT_AUTOGEN_MANIFEST is dangerous?](#why-component_autogen_manifest-is-dangerous)
 
 ## How to bypass checks for \*.pyc files in p5m manifest?
 
@@ -46,10 +45,3 @@
 Generally, libtoolize, aclocal, automake and friends should be run as COMPONENT_PREP_ACTION  when $(@D) is $(SOURCE_DIR), before  changing $(@D) to $(BUILD_DIR_$(BITS)).
 $(CLONEY) should be run in COMPONENT_PRE_CONFIGURE_ACTION.
 Another possible reason is missing some step in configuration - e.g. libtoolize.
-
-## Why COMPONENT_AUTOGEN_MANIFEST is dangerous?
-
-Setting COMPONENT_AUTOGEN_MANIFEST=yes in your component's Makefile and adding empty *.p5m manifest you can make oi-userland build system to generate *.p5m manifest automatically.
-But it's not a very good idea: it hides manifest from you and so manifest can contain garbage.
-Even more, if you change component or its dependencies, the files can be missing from the package without any warning.
-The better alternative is to use "gmake sample-manifest", copy generated manifest to component directory and modify it as needed.
diff --git a/make-rules/ips.mk b/make-rules/ips.mk
index 0434203..19f613d 100644
--- a/make-rules/ips.mk
+++ b/make-rules/ips.mk
@@ -96,12 +96,7 @@
 $(foreach var, $(filter PY3_%_NAMING,$(.VARIABLES)), \
     $(eval $(call add-limiting-variable,$(var))))
 
-
-ifeq   ($(strip $(COMPONENT_AUTOGEN_MANIFEST)),yes)
-AUTOGEN_MANIFEST_TRANSFORMS +=		$(WS_TOP)/transforms/generate-cleanup
-else
 AUTOGEN_MANIFEST_TRANSFORMS +=		$(WS_TOP)/transforms/drop-all
-endif
 
 # For items defined as variables or that may contain whitespace, add
 # them to a list to be expanded into PKG_OPTIONS later.
@@ -474,28 +469,6 @@
 	        $(WS_TOP)/transforms/mkgeneric $< > $@
 	if [ -f $*-GENFRAG.p5m ]; then cat $*-GENFRAG.p5m >> $@; fi
 
-ifeq   ($(strip $(COMPONENT_AUTOGEN_MANIFEST)),yes)
-# auto-generate file/directory list
-$(MANIFEST_BASE)-%.generated:	%.p5m $(BUILD_DIR)
-	(cat $(METADATA_TEMPLATE); \
-	$(PKGSEND) generate $(PKG_HARDLINKS:%=--target %) $(PROTO_DIR)) | \
-	$(PKGMOGRIFY) $(PKG_OPTIONS) /dev/fd/0 $(AUTOGEN_MANIFEST_TRANSFORMS) | \
-		sed -e '/^$$/d' -e '/^#.*$$/d' | $(PKGFMT) | \
-		cat $< - >$@
-
-# mogrify non-parameterized manifests
-$(MANIFEST_BASE)-%.mogrified:	%.generated $(MAKEFILE_PREREQ)
-	$(PKGMOGRIFY) $(PKG_OPTIONS) $< \
-		$(PUBLISH_TRANSFORMS) | \
-		sed -e '/^$$/d' -e '/^#.*$$/d' | uniq >$@
-
-# mogrify parameterized manifests
-$(MANIFEST_BASE)-%.mogrified:	$(MANIFEST_BASE)-%.generated $(MAKEFILE_PREREQ)
-	$(PKGMOGRIFY) $(PKG_OPTIONS) $< \
-		$(PUBLISH_TRANSFORMS) | \
-		sed -e '/^$$/d' -e '/^#.*$$/d' | uniq >$@
-else
-
 per-manifest-options = $(foreach var,$(PKG_VARS),$(if $($(var).$(1)),-D $(var)="$(strip $($(var).$(1)))")) \
 	$(if $(COMPONENT_CLASSIFICATION.$(1)),-D COMPONENT_CLASSIFICATION="org.opensolaris.category.2008:$(strip $(COMPONENT_CLASSIFICATION.$(1)))")
 
@@ -510,7 +483,6 @@
 	$(PKGMOGRIFY) $(PKG_OPTIONS) $< \
 		$(PUBLISH_TRANSFORMS) | \
 		sed -e '/^$$/d' -e '/^#.*$$/d' | uniq >$@
-endif
 
 # mangle the file contents
 $(BUILD_DIR) $(MANGLED_DIR):

--
Gitblit v1.9.3