GNOME Bugzilla – Bug 744021
[PATCH] adding subdir-objects to AM_INIT_AUTOMAKE
Last modified: 2018-02-08 12:32:17 UTC
Created attachment 296160 [details] [review] adding subdir-objects to AM_INIT_AUTOMAKE in order to avoid warning during autoreconf Added subdir-objects to AM_INIT_AUTOMAKE in order to avoid warning during autoreconf. This implies the necessity of invoking yacc/bison and lex in Makefile-giscanner.am. Added a comment about generation of gtk-doc.make in autogen.sh.
Created attachment 296161 [details] [review] comment about generation of gtk-doc.make in autogen.sh
Created attachment 296162 [details] [review] added scannerlexer.h to .gitignore
Created attachment 296163 [details] [review] added rules to make scannerlexer.c/h and scannerparser.c/h to Makefile-giscanner.am
Created attachment 296164 [details] [review] removing $(srcdir) because it is not replaced correctly and not necessary
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
Review of attachment 296164 [details] [review]: Hmm...this looks reasonable, but what actual bug did you hit with this? On what platform are you doing builds and how?
Review of attachment 296163 [details] [review]: This is overriding Automake's builtin rules for lex/yacc; why?
Review of attachment 296160 [details] [review]: Looks fine.
Review of attachment 296161 [details] [review]: OK.
Review of attachment 296162 [details] [review]: OK.
I reverted the subdir-objects change; it broke the build as scannerlexer.h now shows up in a subdirectory.
I will attach a patch which gets subdir-objects to work again. For reference, here is the error (on OS X, Automake 1.14.1) which I presume the patch in comment #4 was intended to solve: Making all in scanner Makefile:1008: .deps/barapp.Po: No such file or directory Makefile:1009: .deps/gettype.Plo: No such file or directory Makefile:1010: .deps/gtkfrob.Plo: No such file or directory Makefile:1011: .deps/libregress_la-annotation.Plo: No such file or directory Makefile:1012: .deps/libregress_la-drawable.Plo: No such file or directory Makefile:1013: .deps/libregress_la-foo.Plo: No such file or directory Makefile:1014: .deps/libregress_la-regress.Plo: No such file or directory Makefile:1015: .deps/libsletter_la-sletter.Plo: No such file or directory Makefile:1016: .deps/libwarnlib_la-warnlib.Plo: No such file or directory Makefile:1017: .deps/typedefs.Plo: No such file or directory make[4]: *** No rule to make target `.deps/typedefs.Plo'. Stop. make[3]: *** [all-recursive] Error 1 The .deps directory is actually put in a directory literally named '$(srcdir)', and that's why the .Plo files can't be found. These three patches (the original subdir-objects, my patch, and this rebase of Kalle's $(srcdir) patch) make everything build cleanly for me after a "git clean -xfd".
Created attachment 316643 [details] [review] removing $(srcdir) because it is not replaced correctly and not necessary
Created attachment 316644 [details] [review] build: Built sources show up in subdirs Since activating the subdir-objects option, the .c and .h files generated by Yacc and Lex will show up in the same directory as the source .y and .l files. The Makefile's BUILT_SOURCES directive should reflect that.
Review of attachment 316643 [details] [review]: ACK
Review of attachment 316644 [details] [review]: ACK
Comment on attachment 316644 [details] [review] build: Built sources show up in subdirs Actually, I was wrong: this breaks in builddir != srcdir scenarios.
Comment on attachment 316643 [details] [review] removing $(srcdir) because it is not replaced correctly and not necessary Attachment 316643 [details] pushed as 17ef691 - removing $(srcdir) because it is not replaced correctly and not necessary
Attachment 316643 [details] also broke the build on GNOME Continuous, because it removed $(srcdir) from too many places, so it seems that just building in my jhbuild was not enough.
I think these went stale in the interim; I had to make a few changes to get them to work when I rebased my devdocs branch [1]. There are updated versions in that branch. But I don't know if those will fix the issues seen on Continuous [1] https://github.com/ptomato/gobject-introspection/commits/wip/ptomato/devdocs324
Review of attachment 296160 [details] [review]: Setting back to "none" status since it was reverted.
Emmanuele, I figured it out - the failures were because the original subdir-objects patch was reverted some time ago as soon as it broke the build. I've unset its status from "committed". The "removing $(srcdir)" patch still needs an adjustment, which I'll attach in a moment.
Created attachment 351151 [details] [review] removing $(srcdir) because it is not replaced correctly and not necessary
Review of attachment 316644 [details] [review]: I think this one can be committed again unchanged with the other two.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gobject-introspection/issues/120.