How to generate GNU make dependency file for a SPEC file automatically?

Francesco francesco.montorsi at
Sat Mar 24 10:59:11 UTC 2018

Hi all,
I have a build system using GNU make that generates at some point a (large)
set of RPMs packaging some C++ software programs built from my sources.
After that step I do further processing using the freshly-built RPMs (like
I regenerate RPM repositories, install these RPMs on containers to test
deployment etc)

Currently every time I invoke "make" I ALWAYS rebuild all RPMs, because I
don't have an easy way to detect which stuff goes into which RPM. Of course
I could manually build a list of such dependencies (e.g., spec A depends on
the binary X, spec B depends on the binary utility Y) but that would become
a mess very easily.
So here's my question:

  Is there a way to ask rpm/rpmbuild to generate a list of a .spec file
dependencies (for its %install stanza)?
 Something like -MT -MMD -MP -MF flags for GCC?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Rpm-list mailing list