From: stephan Date: Sat, 2 Nov 2024 03:34:04 +0000 (+0000) Subject: Add autotools-compatible overridable dir name vars for the various installation targe... X-Git-Tag: major-relase~246 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dea749acc39a2666ce3426a46e67d059227cae84;p=thirdparty%2Fsqlite.git Add autotools-compatible overridable dir name vars for the various installation targets, calculated at make-time instead of exported at configure-time for reasons explained at length in the accompanying comments. FossilOrigin-Name: 24aba7ee58f3048d70ff0c2b2cda26bc04bfb46b3055d25d62ab5ff97b106be2 --- diff --git a/Makefile.in b/Makefile.in index db7c8d5001..ca48f7512c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -56,9 +56,6 @@ all: # TOP = @abs_top_srcdir@ # -# Some standard variables and programs -prefix ?= @prefix@ -# # Just testing some default dir expansions... # srcdir = @srcdir@ # builddir = @builddir@ @@ -67,6 +64,59 @@ prefix ?= @prefix@ # abs_top_builddir = @abs_top_builddir@ # +# +# Autotools-conventional vars which are used by package installation +# rules in main.mk. +# +# Autosetup allows the various XYZdir vars to be overridden at +# configure-time with, e.g. --libdir=X and --mandir=Y. However, +# defining them at configure-time, instead of at make-time, leads to +# later awkwardness: +# +# $ ./configure --prefix=/usr +# $ make prefix=/bar +# +# In that invocation, libdir will be /usr/foo, not /bar/foo as it +# normally should, unless the user _also_ passes libdir=... to make. +# +# In 99%+ of use cases, setting prefix=X has the desired effect of +# calculating conventional defaults for various other dirs, like +# $prefix/lib, $prefix/include, etc. If, however, we export those at +# configure-time, the passing prefix=... to make will update only +# $prefix and none of its derived dirs. +# +# Because it is more important (for our use cases) that these vars be +# overridable via a make invocation than a configure invocation, and +# they conventionally derive from $(prefix) in all but the most exotic +# of use cases, we do not export the configure-defined overrides of +# those vars to this makefile. Instead, we export only $prefix and +# its derived vars are set to their conventional default values in +# main.mk, which users can then override at make-time as needed. +# Overriding $prefix via make will also calculate any derived vars, as +# one would expect, unless each is specifically overridden. +# +# For completeness's sake, the aforementioned conventional vars which +# are relevant to our installation rules are: +# +# datadir = $(prefix)/share +# mandir = $(datadir)/man +# includedir = $(prefix)/include +# exec_prefix = $(prefix) +# bindir = $(exec_prefix)/bin +# libdir = $(exec_prefix)/lib +# +# Our builds do not require any of their relatives: +# +# sbindir = $(exec_prefix)/sbin +# sysconfdir = /etc +# sharedstatedir = $(prefix)/com +# localstatedir = /var +# runstatedir = /run +# infodir = $(datadir)/info +# libexec = $(exec_prefix)/libexec +# +prefix = @prefix@ + INSTALL = @BIN_INSTALL@ AR = @AR@ AR.flags = cr # TODO? Add a configure test to determine this? diff --git a/main.mk b/main.mk index 06d44ec184..2146ba49ef 100644 --- a/main.mk +++ b/main.mk @@ -119,14 +119,31 @@ JIMSH ?= ./jimsh$(T.exe) B.tclsh ?= $(JIMSH) # -# Various system-level directories, mostly needed for installation and -# for finding system-level dependencies. -# -# Aside from ${prefix}, we do not need to (and intentionally do not) -# export any of the dozen-ish shorthand ${XYZdir} vars the autotools -# conventionally defines. -# -prefix ?= /usr/local +# Autotools-conventional vars which are (in this tree) used only by +# package installation rules. +# +# The following ${XYZdir} vars are provided for the sake of clients +# who expect to be able to override these using autotools-conventional +# dir name vars. In this build they apply only to installation-related +# rules. +# +prefix ?= /usr/local +datadir ?= $(prefix)/share +mandir ?= $(datadir)/man +includedir ?= $(prefix)/include +exec_prefix ?= $(prefix) +bindir ?= $(exec_prefix)/bin +libdir ?= $(exec_prefix)/lib +# This makefile does not use any of: +# sbindir ?= $(exec_prefix)/sbin +# sysconfdir ?= /etc +# sharedstatedir ?= $(prefix)/com +# localstatedir ?= /var +# runstatedir ?= /run +# infodir ?= $(datadir)/info +# libexec ?= $(exec_prefix)/libexec + + # # $(LDFLAGS.{feature}) and $(CFLAGS.{feature}) = # @@ -355,11 +372,11 @@ LDFLAGS.libsqlite3 = \ # moral of this story is that spaces in installation paths will break # the install process. # -install-dir.bin = $(DESTDIR)$(prefix)/bin -install-dir.lib = $(DESTDIR)$(prefix)/lib -install-dir.include = $(DESTDIR)$(prefix)/include -install-dir.pkgconfig = $(DESTDIR)$(prefix)/lib/pkgconfig -install-dir.man1 = $(DESTDIR)$(prefix)/share/man/man1 +install-dir.bin = $(DESTDIR)$(bindir) +install-dir.lib = $(DESTDIR)$(libdir) +install-dir.include = $(DESTDIR)$(includedir) +install-dir.pkgconfig = $(DESTDIR)$(libdir)/pkgconfig +install-dir.man1 = $(DESTDIR)$(mandir)/man1 install-dir.all = $(install-dir.bin) $(install-dir.include) \ $(install-dir.lib) $(install-dir.man1) \ $(install-dir.pkgconfig) diff --git a/manifest b/manifest index 23504255f1..b0e73839dd 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C When\sconfiguring\swith\s--with-wasi-sdk,\sensure\sthat\swe\suse\sthat\sSDK's\s'ar'\stool\sinstead\sof\swhatever\sis\sin\sthe\sPATH.\sWhen\spushing/popping\sthe\sdefine\svar\sscope\sfor\sthe\sjimsh\scompatility\scheck,\sinclude\smore\sdefines\sper\sconsultation\swith\sautosetup's\screator. -D 2024-11-01T01:56:27.462 +C Add\sautotools-compatible\soverridable\sdir\sname\svars\sfor\sthe\svarious\sinstallation\stargets,\scalculated\sat\smake-time\sinstead\sof\sexported\sat\sconfigure-time\sfor\sreasons\sexplained\sat\slength\sin\sthe\saccompanying\scomments. +D 2024-11-02T03:34:04.784 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md c5b4009dca54d127d2d6033c22fd9cc34f53bedb6ef12c7cbaa468381c74ab28 -F Makefile.in 3a98abc984222a31c8597a0cd516c8dd9b72554d784a87c915d2e586db4ddb18 +F Makefile.in 55cd298aa41436c426351d7a4f387d5502431f07c96b52f2b4154f0193379150 F Makefile.linux-generic bd3e3cacd369821a6241d4ea1967395c962dfe3057e38cb0a435cee0e8b789d0 F Makefile.msc a92237976eb92c5efaa0dd2524746aec12c196e12df8d4dbff9543a4648c3312 F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159 @@ -697,7 +697,7 @@ F ext/wasm/tests/opfs/concurrency/test.js d08889a5bb6e61937d0b8cbb78c9efbefbf65a F ext/wasm/tests/opfs/concurrency/worker.js 0a8c1a3e6ebb38aabbee24f122693f1fb29d599948915c76906681bb7da1d3d2 F ext/wasm/wasmfs.make bc8bb227f35d5bd3863a7bd2233437c37472a0d81585979f058f9b9b503bef35 F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0 -F main.mk 4941b5880b4ea528258e2186e814463e438a812677478e318920f312408121c7 +F main.mk 01f83a096392922826bca5dda938235f2c2f94988c1f467fe90a8e31aaeed912 F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271 F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504 F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421 @@ -2198,8 +2198,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350 F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7 F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 45a3213d23f4691732ba2eb54d440355ce5757aad4cec8eb92f53b4bd7e7f5cd -R b36a62b0c9c5b7166714591dccfa9711 +P 2dcc465a7090811ddbc210673f37b4c3a4439c501874abefd403efe1e98f5b17 +R 565488b6d72da8ea787b0c37e1464eb8 U stephan -Z ff7715650889932fe27891a2e68d9d47 +Z 2d29757f9585ee6ad461db23d83778f6 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 536ff23a71..ade193ca47 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -2dcc465a7090811ddbc210673f37b4c3a4439c501874abefd403efe1e98f5b17 +24aba7ee58f3048d70ff0c2b2cda26bc04bfb46b3055d25d62ab5ff97b106be2