I'm posting this here to help others who might be having the same issue. I maintain xapian-core ruby gem. I was trying to upgrade to 1.4.2 and had some issues. The generated makefile doesn’t work because of the following: docs/rdocs/index.html: docs/xapian.rb rm -rf docs/rdocs $(MKDIR_P) docs cd docs && $(RDOC) --op rdocs `test -f xapian.rb||echo '$(abs_srcdir)/'`xapian.rb @DOCUMENTATION_RULES_TRUE at docs/xapian.rb: generate-rdoc-stubs xapian.rb ../doxygen-xml/index.xml @DOCUMENTATION_RULES_TRUE@ $(PERL) $(srcdir)/generate-rdoc-stubs @DOCUMENTATION_RULES_TRUE at .rst.html: @DOCUMENTATION_RULES_TRUE@ -case "$@" in */*) d=`echo "$@"|sed 's,/[^/]*$$,,'`; $(MKDIR_P) "$$d" ;; esac @DOCUMENTATION_RULES_TRUE@ $(RST2HTML) --exit-status=warning $< $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: When it tries to build: /Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive Making all in . Making all in ruby make[2]: *** No rule to make target `docs/xapian.rb', needed by `docs/rdocs/index.html'. Stop. make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 I found the problem was because I was running `make clean all` which deletes docs/xapian.rb and then make all fails because it can't build that file.> make cleanMaking clean in . rm -rf .libs _libs rm -f *.lo Making clean in ruby test -z " docs/xapian.rb" || rm -f docs/xapian.rb rm -rf .libs _libs test -z "_xapian.la" || rm -f _xapian.la rm -f ./so_locations rm -f *.o test -z "smoketest.rb.log" || rm -f smoketest.rb.log test -z "smoketest.rb.trs" || rm -f smoketest.rb.trs test -z "test-suite.log" || rm -f test-suite.log rm -f *.lo> make all/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive Making all in . make[2]: Nothing to be done for `all-am'. Making all in ruby make[2]: *** No rule to make target `docs/xapian.rb', needed by `docs/rdocs/index.html'. Stop. make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Perhaps this is a bug? The solution I found which avoids this problem all together is to move the line `if DOCUMENTATION_RULES` to line 101 of ruby/Makefile.am which avoids building documentation unless you request it. I'd suggest this change is merged into the next release which corrects this issue, e.g. ***if DOCUMENTATION_RULES*** (move here) EXTRA_DIST += generate-rdoc-stubs docs/xapian.rb BUILT_SOURCES += docs/rdocs/index.html docs/rdocs/index.html: docs/xapian.rb rm -rf docs/rdocs $(MKDIR_P) docs cd docs && $(RDOC) --op rdocs `test -f xapian.rb||echo '$(abs_srcdir)/'`xapian.rb docs/xapian.rb: generate-rdoc-stubs xapian.rb ../doxygen-xml/index.xml $(PERL) $(srcdir)/generate-rdoc-stubs Kind regards, Samuel
Oh, by the way, just running `make all` works fine too, which is what I am now doing in the gem.. but fixing the makefile would retain the existing working behaviour of `make clean all` which was fine in 1.2.x On 16 January 2017 at 14:21, Samuel Williams <space.ship.traveller at gmail.com> wrote:> I'm posting this here to help others who might be having the same issue. > > I maintain xapian-core ruby gem. > > I was trying to upgrade to 1.4.2 and had some issues. > > The generated makefile doesn’t work because of the following: > > docs/rdocs/index.html: docs/xapian.rb > rm -rf docs/rdocs > $(MKDIR_P) docs > cd docs && $(RDOC) --op rdocs `test -f xapian.rb||echo > '$(abs_srcdir)/'`xapian.rb > > @DOCUMENTATION_RULES_TRUE at docs/xapian.rb: generate-rdoc-stubs > xapian.rb ../doxygen-xml/index.xml > @DOCUMENTATION_RULES_TRUE@ $(PERL) $(srcdir)/generate-rdoc-stubs > > @DOCUMENTATION_RULES_TRUE at .rst.html: > @DOCUMENTATION_RULES_TRUE@ -case "$@" in */*) d=`echo "$@"|sed > 's,/[^/]*$$,,'`; $(MKDIR_P) "$$d" ;; esac > @DOCUMENTATION_RULES_TRUE@ $(RST2HTML) --exit-status=warning $< $@ > > # Tell versions [3.59,3.63) of GNU make to not export all variables. > # Otherwise a system limit (for SysV at least) may be exceeded. > .NOEXPORT: > > > When it tries to build: > > /Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive > Making all in . > Making all in ruby > make[2]: *** No rule to make target `docs/xapian.rb', needed by > `docs/rdocs/index.html'. Stop. > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2 > > I found the problem was because I was running `make clean all` which > deletes docs/xapian.rb and then make all fails because it can't build > that file. > >> make clean > Making clean in . > rm -rf .libs _libs > rm -f *.lo > Making clean in ruby > test -z " docs/xapian.rb" || rm -f docs/xapian.rb > rm -rf .libs _libs > test -z "_xapian.la" || rm -f _xapian.la > rm -f ./so_locations > rm -f *.o > test -z "smoketest.rb.log" || rm -f smoketest.rb.log > test -z "smoketest.rb.trs" || rm -f smoketest.rb.trs > test -z "test-suite.log" || rm -f test-suite.log > rm -f *.lo >> make all > /Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive > Making all in . > make[2]: Nothing to be done for `all-am'. > Making all in ruby > make[2]: *** No rule to make target `docs/xapian.rb', needed by > `docs/rdocs/index.html'. Stop. > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2 > > Perhaps this is a bug? > > The solution I found which avoids this problem all together is to move > the line `if DOCUMENTATION_RULES` to line 101 of ruby/Makefile.am > which avoids building documentation unless you request it. I'd suggest > this change is merged into the next release which corrects this issue, > e.g. > > ***if DOCUMENTATION_RULES*** (move here) > EXTRA_DIST += generate-rdoc-stubs docs/xapian.rb > > BUILT_SOURCES += docs/rdocs/index.html > > docs/rdocs/index.html: docs/xapian.rb > rm -rf docs/rdocs > $(MKDIR_P) docs > cd docs && $(RDOC) --op rdocs `test -f xapian.rb||echo > '$(abs_srcdir)/'`xapian.rb > > docs/xapian.rb: generate-rdoc-stubs xapian.rb ../doxygen-xml/index.xml > $(PERL) $(srcdir)/generate-rdoc-stubs > > Kind regards, > Samuel
On 16 January 2017 at 14:21, Samuel Williams wrote:> The solution I found which avoids this problem all together is to move > the line `if DOCUMENTATION_RULES` to line 101 of ruby/Makefile.am > which avoids building documentation unless you request it.That change would mean that the documentation generated by rdoc won't be built and installed. On Mon, Jan 16, 2017 at 02:22:21PM +1300, Samuel Williams wrote:> Oh, by the way, just running `make all` works fine too, which is what > I am now doing in the gem.. but fixing the makefile would retain the > existing working behaviour of `make clean all` which was fine in 1.2.xAha, the problem is that this file shouldn't standardly be removed by "make clean" - I've pushed 28df9b802d6ccc6dfccbe4b3d41121a9efc7912f to fix this on master and will backport for 1.4.3. Cheers, Olly