On 17/10/2019 16:42, Peng Yu wrote:
I will need to use the actual files to test for dependency (just as
the dependency that can be used by GNU make)

I don’t understand what that means. You want to use a makefile that checks the 
mod date of the database?

Suppose A is a sqlite3 db file, B is some other file which is
generated based on the content in A. When A is not changed, there is
no need to change B, otherwise, B will need to be regenerated. In
other words, B depends on A, and can be handled by tools dealing with
dependencies (e.g., GNU Make, Scons).

Many people replied to this thread suggesting not to directly use
sqlite3, but access the sqlite3 database via a network interface. That
will not be an option, as I don't think a network interface can be
easily supported by those dependency checking tools like GNU Make.

Well, that's wrong, I've been using make, cake, GNU Make, and nmake, across network file systems for decades, and, presuming that the various machines running processes and serving data have their clocks synchronised (and NTP has been a solved problem for a long, long, long time now), it Just Works(TM).

And not just with machines on the same segment of a LAN, some of them have been on the other side of the country (I am in Melbourne, Australia), and even in other countries.

So a make clause like ('ware line wrap):
/path/to/B.txt: /other/path/to/A.db
        echo "select * from abc;" | sqlite3 /other/path/to/A.db > /path/to/B.txt

Will work, regardless of where A.db, B.txt, and the Makefile are located.

        Cheers,
                Gary    B-)
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to