drh | 3043ac7 | 2011-06-03 13:06:50 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # |
| 3 | # Run this script in a directory that contains a valid SQLite makefile in |
| 4 | # order to verify that unintentionally exported symbols. |
| 5 | # |
| 6 | make sqlite3.c |
| 7 | |
drh | 660107f | 2019-04-15 13:51:27 +0000 | [diff] [blame] | 8 | echo '****** Exported symbols from a build including RTREE, FTS4 & FTS5 ******' |
drh | 3043ac7 | 2011-06-03 13:06:50 +0000 | [diff] [blame] | 9 | gcc -c -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE \ |
drh | beaba62 | 2011-10-13 14:18:51 +0000 | [diff] [blame] | 10 | -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_STAT3 \ |
drh | 3043ac7 | 2011-06-03 13:06:50 +0000 | [diff] [blame] | 11 | -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_ENABLE_UNLOCK_NOTIFY \ |
| 12 | -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_ATOMIC_WRITE \ |
drh | 660107f | 2019-04-15 13:51:27 +0000 | [diff] [blame] | 13 | -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_SESSION \ |
| 14 | -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY \ |
drh | 3043ac7 | 2011-06-03 13:06:50 +0000 | [diff] [blame] | 15 | sqlite3.c |
drh | e363c1d | 2011-07-07 08:52:24 +0000 | [diff] [blame] | 16 | nm sqlite3.o | grep ' [TD] ' | sort -k 3 |
drh | 3043ac7 | 2011-06-03 13:06:50 +0000 | [diff] [blame] | 17 | |
drh | 660107f | 2019-04-15 13:51:27 +0000 | [diff] [blame] | 18 | echo '****** Surplus symbols from a build including RTREE, FTS4 & FTS5 ******' |
| 19 | nm sqlite3.o | grep ' [TD] ' | |
| 20 | egrep -v ' .*sqlite3(session|rebaser|changeset|changegroup)?_' |
drh | 3043ac7 | 2011-06-03 13:06:50 +0000 | [diff] [blame] | 21 | |
| 22 | echo '****** Dependencies of the core. No extensions. No OS interface *******' |
drh | beaba62 | 2011-10-13 14:18:51 +0000 | [diff] [blame] | 23 | gcc -c -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_STAT3 \ |
drh | 3043ac7 | 2011-06-03 13:06:50 +0000 | [diff] [blame] | 24 | -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_ENABLE_UNLOCK_NOTIFY \ |
| 25 | -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_ATOMIC_WRITE \ |
| 26 | -DSQLITE_OS_OTHER -DSQLITE_THREADSAFE=0 \ |
| 27 | sqlite3.c |
| 28 | nm sqlite3.o | grep ' U ' | sort -k 3 |
| 29 | |
| 30 | echo '****** Dependencies including RTREE & FTS4 *******' |
| 31 | gcc -c -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE \ |
drh | beaba62 | 2011-10-13 14:18:51 +0000 | [diff] [blame] | 32 | -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_STAT3 \ |
drh | 3043ac7 | 2011-06-03 13:06:50 +0000 | [diff] [blame] | 33 | -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_ENABLE_UNLOCK_NOTIFY \ |
| 34 | -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_ATOMIC_WRITE \ |
| 35 | sqlite3.c |
| 36 | nm sqlite3.o | grep ' U ' | sort -k 3 |