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 772985 - [review] non-recursive make [th/non-recursive-make-bgo772985]
[review] non-recursive make [th/non-recursive-make-bgo772985]
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-10-15 15:59 UTC by Thomas Haller
Modified: 2016-10-21 17:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2016-10-15 15:59:00 UTC
not yet complete, but we can already at least early parts. Please ACK
Comment 1 Thomas Haller 2016-10-15 16:03:46 UTC
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
Comment 2 Thomas Haller 2016-10-15 17:29:13 UTC
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).
Comment 3 Beniamino Galvani 2016-10-17 11:25:12 UTC
> 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.
Comment 4 Thomas Haller 2016-10-17 12:28:45 UTC
(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.
Comment 5 Beniamino Galvani 2016-10-17 13:18:21 UTC
(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.
Comment 6 Thomas Haller 2016-10-21 17:20:12 UTC
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.