On Sat, May 03, 2025 at 03:12:23PM +0900, Masahiro Yamada wrote: > On Sat, May 3, 2025 at 7:54 AM Kees Cook <k...@kernel.org> wrote: > > +quiet_cmd_gcc_plugins_updated = UPDATE $@ > > + cmd_gcc_plugins_updated = echo '/* $^ */' > $(obj)/gcc-plugins-deps.h > > I think 'touch' should be enough. > > If some plugins are disabled, it is detected by the normal if_changed rule.
I kind of likely having the active plugins show up in there, but yes, "touch" is enough (it's what I started with originally). > > +$(obj)/gcc-plugins-deps.h: $(plugin-single) $(plugin-multi) FORCE > > + $(call if_changed,gcc_plugins_updated) > > + > > +always-y += gcc-plugins-deps.h > > -- > > 2.34.1 > > > > > I think it is simpler to place the header > in include/generated/. I couldn't figure out how to do this, but thankfully you did! :) > I attached my suggestion below: > [...] > -quiet_cmd_gcc_plugins_updated = UPDATE $@ > - cmd_gcc_plugins_updated = echo '/* $^ */' > $(obj)/gcc-plugins-deps.h > +quiet_cmd_gcc_plugins_updated = TOUCH $@ > + cmd_gcc_plugins_updated = touch $@ > > -$(obj)/gcc-plugins-deps.h: $(plugin-single) $(plugin-multi) FORCE > +$(obj)/../../include/generated/gcc-plugins-deps.h: $(plugin-single) > $(plugin-multi) FORCE > $(call if_changed,gcc_plugins_updated) > > -always-y += gcc-plugins-deps.h > +always-y += ../../include/generated/gcc-plugins-deps.h Aaagh, thank you! I didn't even consider trying ".." for targets! Yes, this is SO much better! I will read your other replies and work on v3... -- Kees Cook