]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Generic build cleanups.
authorstephan <stephan@noemail.net>
Sat, 19 Oct 2024 16:58:17 +0000 (16:58 +0000)
committerstephan <stephan@noemail.net>
Sat, 19 Oct 2024 16:58:17 +0000 (16:58 +0000)
FossilOrigin-Name: 510afccf02dc9c3e3b928c64c34d10bee66a2343ecec6e24c4770cb0f139cd65

Makefile.in
auto.def
manifest
manifest.uuid

index 78e35fe4d81bb3bf5dd87d676deb3649e8ae667a..6576b58f63526ee38d05a3879dba79e0e0692494 100644 (file)
@@ -72,9 +72,9 @@ LIBTCL = @TCL_LIB_SPEC@
 #XX#
 # Compiler options needed for programs that use the readline() library.
 #
-READLINE_FLAGS = -DHAVE_READLINE=@HAVE_READLINE@ @CFLAGS_READLINE@
-#XX#READLINE_FLAGS += -DHAVE_EDITLINE=@TARGET_HAVE_EDITLINE@
-#XX#READLINE_FLAGS += -DHAVE_LINENOISE=@TARGET_HAVE_LINENOISE@
+CFLAGS_readline = -DHAVE_READLINE=@HAVE_READLINE@ @CFLAGS_READLINE@
+#XX#CFLAGS_readline += -DHAVE_EDITLINE=@TARGET_HAVE_EDITLINE@
+#XX#CFLAGS_readline += -DHAVE_LINENOISE=@TARGET_HAVE_LINENOISE@
 #XX#
 #XX## The library that programs using readline() must link against.
 #XX##
@@ -220,6 +220,9 @@ INSTALL = @BIN_INSTALL@
 INSTALL_noexec = $(INSTALL) -m 0644
 # ^^^ do not use GNU-specific flags to $(INSTALL), e.g. --mode=...
 
+# install.XYZ = dirs for installation. They're in quotes to
+# accommodate installations where paths have spaces in them.
+#
 install.bindir = "$(DESTDIR)$(bindir)"
 install.libdir = "$(DESTDIR)$(libdir)"
 install.includedir = "$(DESTDIR)$(prefix)/include"
@@ -792,19 +795,18 @@ LDFLAGS_libsqlite3 = \
 $(libsqlite3.SO):      $(LIBOBJ)
        $(TLINK_shared) -o $@ \
                $(LIBOBJ) $(TLIBS) $(LDFLAGS_libsqlite3)
+so: $(libsqlite3.SO)
 all: so
 @else
 $(libsqlite3.SO):
        @echo "Build of $@ was explicitly disabled."; exit 1
 @endif
-so: $(libsqlite3.SO)
 
-$(libsqlite3.LIB):     $(LIBOBJ)
+$(libsqlite3.LIB): $(LIBOBJ)
        $(AR) crs $@ $(LIBOBJ)
 lib: $(libsqlite3.LIB)
 all: lib
 
-#
 # Install the $(libsqlite3.SO) as $(libsqlite3.SO).@RELEASE@ and
 # create symlinks which point to it. Do we really need all of this
 # hoop-jumping? Can we not simply install the .so as-is to
@@ -812,6 +814,7 @@ all: lib
 #
 # The historical SQLite build always used a version number of 0.8.6
 # for reasons lost to history.
+#
 install-so: $(install.libdir) $(libsqlite3.SO)
        $(INSTALL) $(libsqlite3.SO) $(install.libdir)
        cd $(install.libdir); \
@@ -823,14 +826,14 @@ install-so: $(install.libdir) $(libsqlite3.SO)
 install: install-so
 @endif
 
-#
 # Install $(libsqlite3.LIB)
+#
 install-lib: $(install.libdir) $(libsqlite3.LIB)
        $(INSTALL_noexec) $(libsqlite3.LIB) $(install.libdir)
 install: install-lib
 
-#
 # Install C header files
+#
 install-includes: sqlite3.h $(install.includedir)
        $(INSTALL_noexec) sqlite3.h "$(TOP)/src/sqlite3ext.h" $(install.includedir)
 install: install-includes
@@ -838,9 +841,8 @@ install: install-includes
 @if HAVE_TCL
 $(libtclsqlite3.SO): tclsqlite.o $(libsqlite3.LIB)
        $(TLINK_shared) -o $@ tclsqlite.o \
-               $(libsqlite3.LIB) $(TCL_INCLUDE_SPEC) \
-               $(TCL_STUB_LIB_SPEC) $(TLIBS) \
-               @TCLLIB_RPATH@
+               $(TCL_INCLUDE_SPEC) $(TCL_STUB_LIB_SPEC) $(LDFLAGS_libsqlite3) \
+               $(libsqlite3.LIB) @TCLLIB_RPATH@
 libtcl:        $(libtclsqlite3.SO)
 
 all:   $(libtclsqlite3.SO)
@@ -850,7 +852,7 @@ pkgIndex.tcl:
 
 @if TCLLIBDIR
 install.tcldir = "$(DESTDIR)@TCLLIBDIR@"
-install-tcl: $(libtclsqlite3.SO) pkgIndex.tcl
+install-tcl: install-lib $(libtclsqlite3.SO) pkgIndex.tcl
        $(INSTALL) -d $(install.tcldir)
        $(INSTALL) $(libtclsqlite3.SO) $(install.tcldir)
        $(INSTALL_noexec) pkgIndex.tcl $(install.tcldir)
@@ -894,7 +896,7 @@ tclextension-list:
 @endif
 
 sqlite3$(TEXE):        shell.c sqlite3.c
-       $(TCC) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+       $(TCC) $(CFLAGS_readline) $(SHELL_OPT) -o $@ \
                shell.c sqlite3.c \
                $(LDFLAGS_libsqlite3) $(LDFLAGS_READLINE)
 cli: sqlite3$(TEXE)
@@ -904,7 +906,6 @@ all: cli
 
 install-cli: sqlite3$(TEXT) $(install.bindir)
        $(INSTALL) -s sqlite3$(TEXT) $(install.bindir)
-
 install: install-cli
 
 sqldiff$(TEXE):        $(TOP)/tool/sqldiff.c $(TOP)/ext/misc/sqlite3_stdio.h sqlite3.o sqlite3.h
@@ -1067,7 +1068,11 @@ has_tclconfig:
        cp fts5.c fts5.h tsrc
        touch .target_source
 
-sqlite3.c:     .target_source $(TOP)/tool/mksqlite3c.tcl src-verify \
+sqlite3.h:     $(TOP)/src/sqlite.h.in $(TOP)/manifest mksourceid$(BEXE) \
+               $(TOP)/VERSION $(BTCLSH) # has_tclsh84
+       $(BTCLSH) $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h
+
+sqlite3.c:     .target_source sqlite3.h $(TOP)/tool/mksqlite3c.tcl src-verify \
                $(BTCLSH) # has_tclsh84
        $(BTCLSH) $(TOP)/tool/mksqlite3c.tcl $(AMALGAMATION_LINE_MACROS) $(EXTRA_SRC)
        cp tsrc/sqlite3ext.h .
@@ -1381,10 +1386,6 @@ parse.c: $(TOP)/src/parse.y lemon$(BEXE)
        cp $(TOP)/src/parse.y .
        ./lemon$(BEXE) $(OPT_FEATURE_FLAGS) $(OPTS) -S parse.y
 
-sqlite3.h:     $(TOP)/src/sqlite.h.in $(TOP)/manifest mksourceid$(BEXE) \
-               $(TOP)/VERSION $(BTCLSH) # has_tclsh84
-       $(BTCLSH) $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h
-
 sqlite3rc.h:   $(TOP)/src/sqlite3.rc $(TOP)/VERSION $(BTCLSH) # has_tclsh84
        echo '#ifndef SQLITE_RESOURCE_VERSION' >$@
        echo -n '#define SQLITE_RESOURCE_VERSION ' >>$@
@@ -1761,6 +1762,15 @@ checksymbols: sqlite3.o
        nm -g --defined-only sqlite3.o
        nm -g --defined-only sqlite3.o | egrep -v $(VALIDIDS); test $$? -ne 0
        echo '0 errors out of 1 tests'
+
+# Build a ZIP archive containing various command-line tools.
+#
+tool-zip:      testfixture$(TEXE) sqlite3$(TEXE) sqldiff$(TEXE) \
+            sqlite3_analyzer$(TEXE) sqlite3_rsync$(TEXE) $(TOP)/tool/mktoolzip.tcl
+       strip sqlite3$(TEXE) sqldiff$(TEXE) sqlite3_analyzer$(TEXE) sqlite3_rsync$(TEXE)
+       ./testfixture$(TEXE) $(TOP)/tool/mktoolzip.tcl
+
+#XX# TODO: adapt the autoconf amalgamation for autosetup
 #XX#
 #XX## Build the amalgamation-autoconf package.  The amalamgation-tarball target builds
 #XX## a tarball named for the version number.  Ex:  sqlite-autoconf-3110000.tar.gz.
@@ -1772,12 +1782,6 @@ checksymbols: sqlite3.o
 #XX#snapshot-tarball: sqlite3.c sqlite3rc.h
 #XX#   TOP=$(TOP) sh $(TOP)/tool/mkautoconfamal.sh --snapshot
 #XX#
-# Build a ZIP archive containing various command-line tools.
-#
-tool-zip:      testfixture$(TEXE) sqlite3$(TEXE) sqldiff$(TEXE) \
-            sqlite3_analyzer$(TEXE) sqlite3_rsync$(TEXE) $(TOP)/tool/mktoolzip.tcl
-       strip sqlite3$(TEXE) sqldiff$(TEXE) sqlite3_analyzer$(TEXE) sqlite3_rsync$(TEXE)
-       ./testfixture$(TEXE) $(TOP)/tool/mktoolzip.tcl
 
 # The next two rules are used to support the "threadtest" target. Building
 # threadtest runs a few thread-safety tests that are implemented in C. This
@@ -1799,75 +1803,6 @@ threadtest: threadtest3$(TEXE)
 threadtest5: sqlite3.c $(TOP)/test/threadtest5.c
        $(TLINK) $(TOP)/test/threadtest5.c sqlite3.c -o $@ $(LDFLAGS_libsqlite3)
 
-# Standard install and cleanup targets
-#
-#XX#lib_install:       libsqlite3.la
-#XX#   $(INSTALL) -d $(DESTDIR)$(libdir)
-#XX#   $(LTINSTALL) libsqlite3.la $(DESTDIR)$(libdir)
-#XX#
-#XX## Use $(tcl_install_$(HAVE_TCL)) to resolve to either tcl_install or
-#XX## an empty value.
-#XX#tcl_install_0 =
-#XX#tcl_install_1 = tcl_install
-#XX#
-#XX#install:   sqlite3$(TEXE) lib_install sqlite3.h sqlite3.pc $(tcl_install_$(HAVE_TCL))
-#XX#   $(INSTALL) -d $(DESTDIR)$(bindir)
-#XX#   $(LTINSTALL) sqlite3$(TEXE) $(DESTDIR)$(bindir)
-#XX#   $(INSTALL) -d $(DESTDIR)$(includedir)
-#XX#   $(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(includedir)
-#XX#   $(INSTALL) -m 0644 $(TOP)/src/sqlite3ext.h $(DESTDIR)$(includedir)
-#XX#   $(INSTALL) -d $(DESTDIR)$(pkgconfigdir)
-#XX#   $(INSTALL) -m 0644 sqlite3.pc $(DESTDIR)$(pkgconfigdir)
-#XX#
-#XX#
-#XX#tcl_install:       lib_install libtclsqlite3.la pkgIndex.tcl
-#XX#   $(INSTALL) -d $(DESTDIR)$(TCLLIBDIR)
-#XX#   $(LTINSTALL) libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)
-#XX#   rm -f $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.a
-#XX#   $(INSTALL) -m 0644 pkgIndex.tcl $(DESTDIR)$(TCLLIBDIR)
-
-# Remove build products sufficient so that subsequent makes will recompile
-# everything from scratch.  Do not remove:
-#
-#   *   test results and test logs
-#   *   output from ./configure
-#
-tidy:
-       rm -f *.lo *.la *.o *.c *.da *.bb *.bbg gmon.* *.rws sqlite3$(TEXE)
-       rm -f fts5.h keywordhash.h opcodes.h sqlite3.h sqlite3ext.h sqlite3session.h
-       rm -rf .libs .deps tsrc .target_source
-       rm -f lemon$(BEXE) sqlite*.tar.gz
-       rm -f mkkeywordhash$(BEXE) mksourceid$(BEXE)
-       rm -f parse.* fts5parse.*
-       rm -f $(libsqlite3.SO) $(libsqlite3.LIB)
-       rm -f tclsqlite3$(TEXE) $(TESTPROGS)
-       rm -f LogEst$(TEXE) fts3view$(TEXE) rollback-test$(TEXE) showdb$(TEXE)
-       rm -f showjournal$(TEXE) showstat4$(TEXE) showwal$(TEXE) speedtest1$(TEXE)
-       rm -f wordcount$(TEXE) changeset$(TEXE) version-info$(TEXE)
-       rm -f *.dll *.lib *.exp *.pc *.vsix *.so *.dylib pkgIndex.tcl
-       rm -f sqlite3_analyzer$(TEXE) sqlite3_rsync$(TEXE) sqlite3_expert$(TEXE)
-       rm -f mptester$(TEXE) rbu$(TEXE)        srcck1$(TEXE)
-       rm -f fuzzershell$(TEXE) fuzzcheck$(TEXE) sqldiff$(TEXE) dbhash$(TEXE)
-       rm -f dbfuzz$(TEXE) dbfuzz2$(TEXE) dbfuzz2-asan$(TEXE) dbfuzz2-msan$(TEXE)
-       rm -f fuzzcheck-asan$(TEXE) fuzzcheck-ubsan$(TEXE) ossshell$(TEXE)
-       rm -f sessionfuzz$(TEXE)
-       rm -f threadtest5$(TEXE)
-       rm -f src-verify has_tclsh* has_tclconfig
-       rm -f tclsqlite3.c
-       rm -f sqlite3rc.h sqlite3.def
-
-#
-# Removes build products and test logs.  Retains ./configure outputs.
-#
-clean: tidy
-       rm -rf omittest* testrunner* testdir*
-       -gmake -C ext/wasm distclean 2>/dev/null; true
-
-# Clean up everything.  No exceptions.
-distclean:     clean
-       rm -f sqlite_cfg.h config.log config.status $(JIMSH) Makefile
-       -gmake -C ext/wasm distclean 2>/dev/null; true
-
 #
 # Windows section
 #
@@ -1881,7 +1816,6 @@ sqlite3.dll: $(LIBOBJ) sqlite3.def
        $(TCC) @SHOBJ_LDFLAGS@ -o $@ sqlite3.def \
                -Wl,"--strip-all" $(LIBOBJ)
 
-
 #
 # Fiddle app
 #
@@ -1918,3 +1852,47 @@ misspell: ./custom.rws has_tclsh84
 #
 version-info$(TEXE):   $(TOP)/tool/version-info.c Makefile sqlite3.h
        $(TLINK) $(ST_OPT) -o $@ $(TOP)/tool/version-info.c
+
+
+# Remove build products sufficient so that subsequent makes will recompile
+# everything from scratch.  Do not remove:
+#
+#   *   test results and test logs
+#   *   output from ./configure
+#
+tidy:
+       rm -f *.o *.c *.da *.bb *.bbg gmon.* *.rws sqlite3$(TEXE)
+       rm -f fts5.h keywordhash.h opcodes.h sqlite3.h sqlite3ext.h sqlite3session.h
+       rm -rf .libs .deps tsrc .target_source
+       rm -f lemon$(BEXE) sqlite*.tar.gz
+       rm -f mkkeywordhash$(BEXE) mksourceid$(BEXE)
+       rm -f parse.* fts5parse.*
+       rm -f $(libsqlite3.SO) $(libsqlite3.LIB)
+       rm -f tclsqlite3$(TEXE) $(TESTPROGS)
+       rm -f LogEst$(TEXE) fts3view$(TEXE) rollback-test$(TEXE) showdb$(TEXE)
+       rm -f showjournal$(TEXE) showstat4$(TEXE) showwal$(TEXE) speedtest1$(TEXE)
+       rm -f wordcount$(TEXE) changeset$(TEXE) version-info$(TEXE)
+       rm -f *.dll *.lib *.exp *.pc *.vsix *.so *.dylib pkgIndex.tcl
+       rm -f sqlite3_analyzer$(TEXE) sqlite3_rsync$(TEXE) sqlite3_expert$(TEXE)
+       rm -f mptester$(TEXE) rbu$(TEXE)        srcck1$(TEXE)
+       rm -f fuzzershell$(TEXE) fuzzcheck$(TEXE) sqldiff$(TEXE) dbhash$(TEXE)
+       rm -f dbfuzz$(TEXE) dbfuzz2$(TEXE) dbfuzz2-asan$(TEXE) dbfuzz2-msan$(TEXE)
+       rm -f fuzzcheck-asan$(TEXE) fuzzcheck-ubsan$(TEXE) ossshell$(TEXE)
+       rm -f sessionfuzz$(TEXE)
+       rm -f threadtest5$(TEXE)
+       rm -f src-verify$(BEXE) has_tclsh* has_tclconfig
+       rm -f tclsqlite3.c
+       rm -f sqlite3rc.h sqlite3.def
+
+#
+# Removes build products and test logs.  Retains ./configure outputs.
+#
+clean: tidy
+       rm -rf omittest* testrunner* testdir*
+       -gmake -C ext/wasm distclean 2>/dev/null; true
+
+# Clean up everything.  No exceptions.
+distclean:     clean
+       rm -f sqlite_cfg.h config.log config.status $(JIMSH) Makefile
+       rm -f $(TOP)/tool/emcc.sh
+       -gmake -C ext/wasm distclean 2>/dev/null; true
index 95be21f7b54a5403354758e423b04771ddcacc20..ee958ec23f85bdb4166dd4a4c870ff667abcb4cd 100644 (file)
--- a/auto.def
+++ b/auto.def
@@ -186,8 +186,14 @@ if {".exe" eq [get-define TARGET_EXEEXT]} {
 # Programs needed
 if {"" eq [hwaci-bin-define install]} {
   msg-result "Cannot find install binary, so 'make install' will not work."
+  # Reminder: we historically have ./install-sh in the source tree.
+  # Can we not simply use that?
+  # define BIN_INSTALL "$top_srcdir/install-sh"
+  # Nope: it MOVES its source files over the target, which
+  # break the installation in some cases.
 }
 
+
 ########################################################################
 # Locate a compiler for the build machine.  This compiler should
 # generate command-line programs that run on the build machine.
index 423bc1521bd44f328ea9c1241097d9f149a5fb57..c2ac84e840b0dd85a1f101ba2680bf835987bee5 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,9 +1,9 @@
-C Merge\strunk\sinto\sautosetup\sbranch.
-D 2024-10-19T13:51:23.926
+C Generic\sbuild\scleanups.
+D 2024-10-19T16:58:17.870
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
-F Makefile.in 6b04997777dc413628a51699c018152916e1619209e29a8a73709a9cc16b90aa
+F Makefile.in b9de6145692620a3176e9a0e6a1317a049d6bf2559896f642ae9fdc6aba3a627
 F Makefile.linux-gcc f3842a0b1efbfbb74ac0ef60e56b301836d05b4d867d014f714fa750048f1ab6
 F Makefile.msc 58b69eda1faad5d475092b8aeffab9156ee4901a82db089b166607f2ec907ee4
 F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159
@@ -14,7 +14,7 @@ F art/icon-80x90.gif 65509ce3e5f86a9cd64fe7fca2d23954199f31fe44c1e09e208c80fb83d
 F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
 F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
 F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
-F auto.def 0aea47e732fe1f71630413f9aba879fef838b8bac6c7b3c6199f23b37e541f67
+F auto.def c212e2066f75941113296d1120b3375388816eaee7f04e1342f0a8e82dec03fc
 F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
 F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347
 F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
@@ -2240,8 +2240,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 38cc5db3a8f3079c9be18a9939dae9ba8f4411d4c2361369d697d32f536fc3a4 5a594dbcd533aa1e37acea1702db993672c3c0e621add9ea26a497c52037617f
-R e4c37ecd7ba282a9f70fee00d4c29fdd
+P 2923a8924c92f62d07cb130462a8e6f4662837bad1a02bda53e630b64c692f60
+R e27a73e275f999d0b19f7fb9f885c617
 U stephan
-Z e05981fda14776e17a9ed904f59c6662
+Z 78428a8bc6db32b4f76584c8d3747578
 # Remove this line to create a well-formed Fossil manifest.
index 22c213f24cabe6b906ce73c2ac3be87cbdff4cc1..3bc8019b6bdac6c3b6351311bba02fd8c2a03368 100644 (file)
@@ -1 +1 @@
-2923a8924c92f62d07cb130462a8e6f4662837bad1a02bda53e630b64c692f60
+510afccf02dc9c3e3b928c64c34d10bee66a2343ecec6e24c4770cb0f139cd65