Thanks for your reply. I just did a test: 1. I used the commands cp -a and cp -r respectively, and the result was that when I ran make html, both regenerated all the html.
2. I created a new empty directory (newproject) and copied the _build directory from the original project directory to the new directory (newproject) first; after three minutes, I copied all the directories except the _build directory from the original project directory to the new directory (newproject). After that, I ran make html in the new directory (newproject) and it still regenerated all the html. 3. I am not quite sure what kind of touchwg command should be used to do this. 在2023年4月21日星期五 UTC+8 06:54:13<antl...@youngman.org.uk> 写道: > On 20/04/2023 23:26, ycproject wrote: > > > > Do you mean that there is no way to deal with this problem unless I can > > change the "file changed" calculation in sphinx? > > No, not at all. > > The problem is you have COPIED the files, and changed the DATE MODIFIED > flag. That has confused make. This problem is NOTHING to do with Sphinx, > and EVERYTHING to do with the copy command (and with make). > > Forget Sphinx, you need to learn about timestamps and make. There's no > such thing as "the file changed calculation in Sphinx". > > Basically, you need to either (1) stop the copy command changing the > "date modified" time by using something like "cp -a", or (2) you need to > fudge the copy by making sure it copies the build directory before the > source directory, or (3) you fool make by running something like "touch" > over the build files so make things they're later than the source. > > IT'S NOTHING TO DO WITH SPHINX. > > Cheers, > Wol > > > 在2023年4月21日星期五 UTC+8 02:22:38<antl...@youngman.org.uk> 写道: > > > > On 19/04/2023 23:18, ycproject wrote: > > > I want to generate html only for those .rst files that have been > > > modified, and for the unmodified .rst files, don't generate new > > html files. > > > > Not knowing my way around make that well but ... did you just do a cp, > > or a "cp -a". > > > > The fact you copied the files has probably changed all the timestamps, > > and that will have upset the "files changed" calculation ... > > > > Cheers, > > Wol > > > > -- > > You received this message because you are subscribed to the Google > > Groups "sphinx-users" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to sphinx-users...@googlegroups.com > > <mailto:sphinx-users...@googlegroups.com>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/sphinx-users/13dee6ce-6092-4d00-8e98-dbde980b8d35n%40googlegroups.com > > < > https://groups.google.com/d/msgid/sphinx-users/13dee6ce-6092-4d00-8e98-dbde980b8d35n%40googlegroups.com?utm_medium=email&utm_source=footer > >. > -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/d5432ae2-4e2e-4c11-a338-0b5535bbc1c3n%40googlegroups.com.