diff options
author | Kelvin M. Klann <kmk3.code@protonmail.com> | 2022-06-22 03:45:57 -0300 |
---|---|---|
committer | Kelvin M. Klann <kmk3.code@protonmail.com> | 2022-08-14 02:17:39 -0300 |
commit | 7bbcf7eab290c8b9f683f71838009933df2295b5 (patch) | |
tree | 2a26d88a002cb0815aa4342eb6aa413ee67397e9 /Makefile | |
parent | build: add new TARNAME variable (diff) | |
download | firejail-7bbcf7eab290c8b9f683f71838009933df2295b5.tar.gz firejail-7bbcf7eab290c8b9f683f71838009933df2295b5.tar.zst firejail-7bbcf7eab290c8b9f683f71838009933df2295b5.zip |
build: use TARNAME instead of NAME for paths
PACKAGE_TARNAME is the same as PACKAGE_NAME but normalized, so it should
be safer to use in paths. For example, on a downstream project, if
spaces or shell metacharacters are added to the package name, a path
that uses PACKAGE_TARNAME should keep working.
From the manual of GNU Autoconf (version 2.69):
> -- Macro: AC_INIT (PACKAGE, VERSION, [BUG-REPORT], [TARNAME], [URL])
> Process any command-line arguments and perform initialization and
> verification.
>
> Set the name of the PACKAGE and its VERSION. These are typically
> used in '--version' support, including that of 'configure'. The
> optional argument BUG-REPORT should be the email to which users
> should send bug reports. The package TARNAME differs from
> PACKAGE: the latter designates the full package name (e.g., 'GNU
> Autoconf'), while the former is meant for distribution tar ball
> names (e.g., 'autoconf'). It defaults to PACKAGE with 'GNU '
> stripped, lower-cased, and all characters other than
> alphanumerics and underscores are changed to '-'.
Note also that by default (on autoconf v2.69), `docdir=@docdir@` in
config.mk.in expands to the following in config.mk:
docdir=${datarootdir}/doc/${PACKAGE_TARNAME}
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -221,14 +221,14 @@ dist: config.mk | |||
221 | make distclean | 221 | make distclean |
222 | mv config.status.old config.status | 222 | mv config.status.old config.status |
223 | mv config.sh.old config.sh | 223 | mv config.sh.old config.sh |
224 | rm -fr $(NAME)-$(VERSION) $(NAME)-$(VERSION).tar.xz | 224 | rm -fr $(TARNAME)-$(VERSION) $(TARNAME)-$(VERSION).tar.xz |
225 | mkdir -p $(NAME)-$(VERSION)/test | 225 | mkdir -p $(TARNAME)-$(VERSION)/test |
226 | cp -a $(DISTFILES) $(NAME)-$(VERSION) | 226 | cp -a $(DISTFILES) $(TARNAME)-$(VERSION) |
227 | cp -a $(DISTFILES_TEST) $(NAME)-$(VERSION)/test | 227 | cp -a $(DISTFILES_TEST) $(TARNAME)-$(VERSION)/test |
228 | rm -rf $(NAME)-$(VERSION)/src/tools | 228 | rm -rf $(TARNAME)-$(VERSION)/src/tools |
229 | find $(NAME)-$(VERSION) -name .svn -delete | 229 | find $(TARNAME)-$(VERSION) -name .svn -delete |
230 | tar -cJvf $(NAME)-$(VERSION).tar.xz $(NAME)-$(VERSION) | 230 | tar -cJvf $(TARNAME)-$(VERSION).tar.xz $(TARNAME)-$(VERSION) |
231 | rm -fr $(NAME)-$(VERSION) | 231 | rm -fr $(TARNAME)-$(VERSION) |
232 | 232 | ||
233 | asc: config.mk | 233 | asc: config.mk |
234 | ./mkasc.sh $(VERSION) | 234 | ./mkasc.sh $(VERSION) |
@@ -240,11 +240,11 @@ deb-apparmor: dist config.sh | |||
240 | ./mkdeb.sh -apparmor --enable-apparmor | 240 | ./mkdeb.sh -apparmor --enable-apparmor |
241 | 241 | ||
242 | test-compile: dist config.mk | 242 | test-compile: dist config.mk |
243 | cd test/compile; ./compile.sh $(NAME)-$(VERSION) | 243 | cd test/compile; ./compile.sh $(TARNAME)-$(VERSION) |
244 | 244 | ||
245 | .PHONY: rpms | 245 | .PHONY: rpms |
246 | rpms: src/man config.mk | 246 | rpms: src/man config.mk |
247 | ./platform/rpm/mkrpm.sh $(NAME) $(VERSION) | 247 | ./platform/rpm/mkrpm.sh $(TARNAME) $(VERSION) |
248 | 248 | ||
249 | extras: all | 249 | extras: all |
250 | $(MAKE) -C extras/firetools | 250 | $(MAKE) -C extras/firetools |