GNOME Bugzilla – Bug 646532
New autotools backend doesn't parse conditionally enabled subdirs, even when enabled
Last modified: 2020-11-06 20:21:47 UTC
If e.g. Makefile.am has if USE_LIBGTK TOOLS_DIR = tools else TOOLS_DIR = endif SUBDIRS = libgssdp $(TOOLS_DIR) tests doc then tools is completely ignored. For an example, see http://gitorious.org/gupnp/gssdp
Thanks for reporting this issue. I think the value is not ignored but overwritten by the last definition. So I suppose that if USE_LIBGTK TOOLS_DIR = else TOOLS_DIR = tools endif will find the tools directory. Anyway, I will try to fix it.
Ah, ok. Makes sense. Thanks for looking into it.
Created attachment 208370 [details] Screenshot Some update: with master the subdir isn't ignored anymore but there is one called $(TOOLS_DIR) now (see screenshot)
Yes, I know. It's one of the issue remaining in the autotools backend. I don't know how to handle this. Probably the best solution would be to merge all definition, reading it like TOOLS_DIR = TOOLS_DIR += tools But it makes sense only if the values could be appended. If by example, I have if DEBUG_VERSION CFLAGS = -O0 -g else CFLAGS = -O3 endif You will see CFLAGS=-O0 -g -O3 in the GUI and I don't see how I could handle this in a better way.
Maybe it makes sense to special-case SUBDIRS here as it's not _that_ problematic for other variables but really annoying if you can't see everything in your project?
(In reply to comment #5) > Maybe it makes sense to special-case SUBDIRS here as it's not _that_ > problematic for other variables but really annoying if you can't see everything > in your project? Uch, I should read my own bug description. Nevermind that comment :(
I think I can append them as it will be useful for SUBDIRS variables and it will not be really worst for other variables. But this is not easy to do, it will not be done for 3.4 perhaps for 3.6.
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports in Bugzilla which have not seen updates for many years. If you can still reproduce this issue in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/anjuta/-/issues/ Thank you for reporting this issue and we are sorry it could not be fixed.