After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 744021 - [PATCH] adding subdir-objects to AM_INIT_AUTOMAKE
[PATCH] adding subdir-objects to AM_INIT_AUTOMAKE
Status: RESOLVED OBSOLETE
Product: gobject-introspection
Classification: Platform
Component: build
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-02-04 23:49 UTC by Kalle Richter
Modified: 2018-02-08 12:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
adding subdir-objects to AM_INIT_AUTOMAKE in order to avoid warning during autoreconf (831 bytes, patch)
2015-02-04 23:49 UTC, Kalle Richter
none Details | Review
comment about generation of gtk-doc.make in autogen.sh (761 bytes, patch)
2015-02-04 23:50 UTC, Kalle Richter
committed Details | Review
added scannerlexer.h to .gitignore (559 bytes, patch)
2015-02-04 23:50 UTC, Kalle Richter
committed Details | Review
added rules to make scannerlexer.c/h and scannerparser.c/h to Makefile-giscanner.am (883 bytes, patch)
2015-02-04 23:50 UTC, Kalle Richter
reviewed Details | Review
removing $(srcdir) because it is not replaced correctly and not necessary (6.72 KB, patch)
2015-02-04 23:51 UTC, Kalle Richter
none Details | Review
removing $(srcdir) because it is not replaced correctly and not necessary (7.08 KB, patch)
2015-12-02 06:22 UTC, Philip Chimento
none Details | Review
build: Built sources show up in subdirs (1.23 KB, patch)
2015-12-02 06:22 UTC, Philip Chimento
none Details | Review
removing $(srcdir) because it is not replaced correctly and not necessary (5.13 KB, patch)
2017-05-05 06:23 UTC, Philip Chimento
none Details | Review

Description Kalle Richter 2015-02-04 23:49:33 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.
Comment 1 Kalle Richter 2015-02-04 23:50:02 UTC
Created attachment 296161 [details] [review]
comment about generation of gtk-doc.make in autogen.sh
Comment 2 Kalle Richter 2015-02-04 23:50:18 UTC
Created attachment 296162 [details] [review]
added scannerlexer.h to .gitignore
Comment 3 Kalle Richter 2015-02-04 23:50:36 UTC
Created attachment 296163 [details] [review]
added rules to make scannerlexer.c/h and scannerparser.c/h to Makefile-giscanner.am
Comment 4 Kalle Richter 2015-02-04 23:51:02 UTC
Created attachment 296164 [details] [review]
removing $(srcdir) because it is not replaced correctly and not necessary
Comment 5 André Klapper 2015-02-07 17:17:51 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
Comment 6 Colin Walters 2015-02-13 20:26:57 UTC
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?
Comment 7 Colin Walters 2015-02-13 20:29:19 UTC
Review of attachment 296163 [details] [review]:

This is overriding Automake's builtin rules for lex/yacc; why?
Comment 8 Colin Walters 2015-02-13 20:29:39 UTC
Review of attachment 296160 [details] [review]:

Looks fine.
Comment 9 Colin Walters 2015-02-13 20:29:51 UTC
Review of attachment 296161 [details] [review]:

OK.
Comment 10 Colin Walters 2015-02-13 20:29:58 UTC
Review of attachment 296162 [details] [review]:

OK.
Comment 11 Colin Walters 2015-02-13 20:39:01 UTC
I reverted the subdir-objects change; it broke the build as scannerlexer.h now shows up in a subdirectory.
Comment 12 Philip Chimento 2015-12-02 06:18:43 UTC
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".
Comment 13 Philip Chimento 2015-12-02 06:22:13 UTC
Created attachment 316643 [details] [review]
removing $(srcdir) because it is not replaced correctly and not necessary
Comment 14 Philip Chimento 2015-12-02 06:22:17 UTC
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.
Comment 15 Emmanuele Bassi (:ebassi) 2017-05-04 21:20:46 UTC
Review of attachment 316643 [details] [review]:

ACK
Comment 16 Emmanuele Bassi (:ebassi) 2017-05-04 21:21:09 UTC
Review of attachment 316644 [details] [review]:

ACK
Comment 17 Emmanuele Bassi (:ebassi) 2017-05-04 21:52:01 UTC
Comment on attachment 316644 [details] [review]
build: Built sources show up in subdirs

Actually, I was wrong: this breaks in builddir != srcdir scenarios.
Comment 18 Emmanuele Bassi (:ebassi) 2017-05-04 21:52:39 UTC
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
Comment 19 Emmanuele Bassi (:ebassi) 2017-05-04 22:14:37 UTC
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.
Comment 20 Philip Chimento 2017-05-04 22:30:57 UTC
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
Comment 21 Philip Chimento 2017-05-05 06:14:40 UTC
Review of attachment 296160 [details] [review]:

Setting back to "none" status since it was reverted.
Comment 22 Philip Chimento 2017-05-05 06:16:29 UTC
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.
Comment 23 Philip Chimento 2017-05-05 06:23:24 UTC
Created attachment 351151 [details] [review]
removing $(srcdir) because it is not replaced correctly and not necessary
Comment 24 Philip Chimento 2017-05-05 06:24:06 UTC
Review of attachment 316644 [details] [review]:

I think this one can be committed again unchanged with the other two.
Comment 25 GNOME Infrastructure Team 2018-02-08 12:32:17 UTC
-- 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.