make: Own the top-level project directories in packages #88
Loading…
Reference in a new issue
No description provided.
Delete branch "jan/fix/20260907-make-own-the-top-level-project-directories-in-packages"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR makes the install machinery install and log the top-level project directories, so the built packages own /opt/ and /etc/opt/ and uninstalling a subpackage no longer leaves empty directories behind:
make: Support INSTALL_PREFIXDIR
During "make install", the packaging machinery should run "$(LOG_INSTALL) -D /opt/" but runs "mkdir -p /opt/" instead. As a consequence, the created directory is not owned by any of the created packages. This commit fixes that by introducing INSTALL_PREFIXDIR and installing it like all other directories.
make: Fix CONFIG_SUBDIR
The existence of CONFIG_SUBDIR hijacks INSTALL_CFGDIR to a subdirectory (by default /etc/opt//$(CONFIG_SUBDIR)). Then std_install_rules apply, and (the bent) INSTALL_CFGDIR is installed, but its parent directory, the original $(INSTALL_CFGDIR), is not a prerequisite of install anylonger, and has no rule anymore, hence log-install is never run for it. Instead it's implicitly created by log-install -D $(INSTALL_CFGDIR).
This commit gives /etc/opt/ std-install rule and variables back as CFGTOPDIR variants, and inserts it early into the install target's prerequisite list.
fe2ae06367f33f47c2b3