From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id BC68F6DE1040 for ; Sat, 20 Apr 2019 17:12:14 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.027 X-Spam-Level: X-Spam-Status: No, score=-0.027 tagged_above=-999 required=5 tests=[AWL=-0.026, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gc5-_pf2pSW9 for ; Sat, 20 Apr 2019 17:12:13 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id AF7086DE0F8A for ; Sat, 20 Apr 2019 17:12:13 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1hI05a-0002iT-0a; Sat, 20 Apr 2019 20:12:10 -0400 Received: (nullmailer pid 21007 invoked by uid 1000); Sun, 21 Apr 2019 00:12:07 -0000 From: David Bremner To: Daniel Kahn Gillmor , Notmuch Mail Subject: Re: subsequent rebuilds of notmuch always re-build sphinx and ruby In-Reply-To: <87r29wwgq2.fsf@fifthhorseman.net> References: <87r29wwgq2.fsf@fifthhorseman.net> Date: Sat, 20 Apr 2019 21:12:07 -0300 Message-ID: <87a7gkdxns.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Apr 2019 00:12:14 -0000 Daniel Kahn Gillmor writes: > Hi folks-- > > when i run "make" from my source tree, and it succeeds, i typically > expect that running "make" again will show that nothing needs to be > done. > > but that's not the case. Both the sphinx-based documentation and the > ruby notmuch.so are always rebuilt, i think due to some sort of > dependency loop. > > But i don't really understand the dependencies there. Maybe someone who > understands either ruby or sphinx better than i do can clean it up? > Having clean dependency tracking and quick rebuilds makes a project a > lot more fun to hack on. > > Here's a trace of the rebuild process: > > 0 dkg@alice:~/src/notmuch/notmuch$ ./configure && make > [=E2=80=A6] > make[1]: Leaving directory '/home/dkg/src/notmuch/notmuch/bindings/ruby' > 0 dkg@alice:~/src/notmuch/notmuch$ make --trace > doc/Makefile.local:53: update target 'sphinx-html' due to: docstring.stamp > sphinx-build -b html -d doc/_build/doctrees -q ./doc doc/_build/html > doc/Makefile.local:56: update target 'sphinx-texinfo' due to: docstring.s= tamp > sphinx-build -b texinfo -d doc/_build/doctrees -q ./doc doc/_build/texinfo > doc/Makefile.local:59: update target 'sphinx-info' due to: sphinx-texinfo > make -C doc/_build/texinfo info > make[1]: Entering directory '/home/dkg/src/notmuch/notmuch/doc/_build/tex= info' > Makefile:32: update target 'notmuch-search-terms.info' due to: notmuch-se= arch-terms.texi This is not our Makefile, but something generated by sphinx; it would not be that hard to replace if the problem was there. Alas I think the underlying problem seems to be that "sphinx-build -b texinfo" is regenerating (or at least touching) all of the texi files. I suspect that's a limitation of sphinx-builder texinfo output. > cd bindings/ruby && \ > EXTRA_LDFLAGS=3D"-Wl,--no-undefined" \ > LIBNOTMUCH=3D"../../lib/libnotmuch.so" \ > NOTMUCH_SRCDIR=3D'/home/dkg/src/notmuch/notmuch' \ > ruby extconf.rb --vendor > creating Makefile > make -C bindings/ruby > make[1]: Entering directory '/home/dkg/src/notmuch/notmuch/bindings/ruby' > Makefile:258: update target 'notmuch.so' due to: Makefile > echo linking shared-object notmuch.so > linking shared-object notmuch.so > rm -f notmuch.so > gcc -shared -o notmuch.so database.o directory.o filenames.o init.o messa= ge.o messages.o query.o status.o tags.o thread.o threads.o -L. -L/usr/lib/x= 86_64-linux-gnu -L. -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl= ,-export-dynamic -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,--compress-= debug-sections=3Dzlib ../../lib/libnotmuch.so -lruby-2.5 -lpthread -lgmp= -ldl -lcrypt -lm -lc > make[1]: Leaving directory '/home/dkg/src/notmuch/notmuch/bindings/ruby' > 0 dkg@alice:~/src/notmuch/notmuch$ This Makefile is generated by "ruby extconf.rb --vendor". It includes a dependency on itself, so it always fires after running "ruby extconf.rb". It might be only running "ruby extconf.rb" if bindings/ruby/Makefile does not exist would fix this particular issue. That sounds more gnu make specific than ruby specific. d