paradoxxxzero / gnome-shell-system-monitor-applet

Display system informations in gnome shell status bar, such as memory usage, cpu usage, network rates…
GNU General Public License v3.0
1.75k stars 324 forks source link

Fix dependency tree in Makefile to ensure schema is built *after* it's dropped when running in parallel #787

Open ZimbiX opened 1 year ago

ZimbiX commented 1 year ago

Resolves https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet/issues/786.

I barely have any experience with Makefiles, but managed to figure this one out pretty quickly.

Previously, when using -j4, it was showing an error on every second run:

➜ make -j4 install
  [remove      ]
/home/brendan/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com
  [extension   ] OK
Reloading extensions does not work correctly and is no longer supported
  [reload      ] OK
  [remove      ] OK
  [translate   ] ar/ ca/ cs/ de/ es_ES/ es_MX/ fa/ fi/ fr/ hu/ it/ ja/
ko/ nl_NL/ pl/ pt/ pt_BR/ ro/ ru/ sk/ tr/ uk/ zh_CN/
  [translate   ] OK
cp: cannot stat
'system-monitor@paradoxxx.zero.gmail.com/schemas/gschemas.compiled': No
such file or directory
make: *** [Makefile:162: build] Error 1

Now it works consistently:

➜ make -j4 install
  [remove      ]
/home/brendan/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com
  [gschemas    ] OK
  [extension   ] OK
Reloading extensions does not work correctly and is no longer supported
  [reload      ] OK
  [remove      ] OK
  [translate   ] ar/ ca/ cs/ de/ es_ES/ es_MX/ fa/ fi/ fr/ hu/ it/ ja/
ko/ nl_NL/ pl/ pt/ pt_BR/ ro/ ru/ sk/ tr/ uk/ zh_CN/
  [translate   ] OK
  [build       ] OK
  [install     ]
/home/brendan/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com
Reloading extensions does not work correctly and is no longer supported
  [reload      ] OK
  [install     ] OK
mgalgs commented 1 year ago

LGTM. I don't know why the _drop-gschemas target even exists though since it's not used anywhere else... IMO the rm should just be part of the ./$(UUID)/schemas/gschemas.compiled recipe and _drop-gschemas should just be nuked...