GNOME Bugzilla – Bug 772985
[review] non-recursive make [th/non-recursive-make-bgo772985]
Last modified: 2016-10-21 17:20:12 UTC
not yet complete, but we can already at least early parts. Please ACK
later on, we can simplify some stuff. E.g. having a common AM_CPPFLAGS, etc. But first, let's merge everything and see what the similarities are
note that this changes the filename __FILE__ as seen by the compiler... for example, journal will now have fields like: CODE_FILE=src/nm-exported-object.c (but I think that is fine).
> build: merge "src/Makefile.am" into toplevel Makefile Had to rename "nm-enum-types.h" because it works badly with "libnm/nm-enum-types.h". Maybe I could fix that differently, but duplicate names is anyway error prone. What is the problem that wasn't present before? The rest LGTM.
(In reply to Beniamino Galvani from comment #3) > > build: merge "src/Makefile.am" into toplevel Makefile > > Had to rename "nm-enum-types.h" because it works badly with > "libnm/nm-enum-types.h". Maybe I could fix that differently, > but duplicate names is anyway error prone. > > What is the problem that wasn't present before? the automake variables are GLIB_GENERATED += \ »···src/nm-src-enum-types.h \ »···src/nm-src-enum-types.c nm_src_enum_types_MKENUMS_H_FLAGS = --identifier-prefix... nm_src_enum_types_MKENUMS_C_FLAGS = --identifier-prefix... nm_src_enum_types_sources = ... for some reason, these variables must be named like this, and not src_nm_src_enum_types_sources. Thus, src/nm-enum-types.h conflicts with libnm/nm-enum-types.h. Before it didn't, because they were in different makefiles.
(In reply to Thomas Haller from comment #4) > (In reply to Beniamino Galvani from comment #3) > > > build: merge "src/Makefile.am" into toplevel Makefile > > > > Had to rename "nm-enum-types.h" because it works badly with > > "libnm/nm-enum-types.h". Maybe I could fix that differently, > > but duplicate names is anyway error prone. > > > > What is the problem that wasn't present before? > > the automake variables are > > GLIB_GENERATED += \ > »···src/nm-src-enum-types.h \ > »···src/nm-src-enum-types.c > nm_src_enum_types_MKENUMS_H_FLAGS = --identifier-prefix... > nm_src_enum_types_MKENUMS_C_FLAGS = --identifier-prefix... > nm_src_enum_types_sources = ... > > for some reason, these variables must be named like this, and not > src_nm_src_enum_types_sources. That's probably because Makefile.glib does: _glib_enum_types_prefix = $(subst -,_,$(notdir $(1))) Anyway, using a different name is fine in my opinion.
merged: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=67cc67ce46166d12e09a5848633c46274b84cc87 I tested it extensively, and it looks good to me. Let's wrinkle out remaining issues as they appear.