0

How to create a Makefile's target that calls a specific yum install:

yum install libarchive-devel.x86_64

but only if the desired package isn't yet installed. Maybe a yum list installed | grep libarchive to check...

My goal is to call: sudo yum install libarchive-devel.x86_64 but only if the package isn't installed yet. A kind of Maven like in an abstract way.

Don't need any specific version of it. Only it to be x86_64.

Rodrigo Gurgel
  • 1,696
  • 2
  • 15
  • 32

1 Answers1

0

Solution:

»»» below means a tab char

installLib:
»»»rpm -qa | egrep -q libarchive-devel.*64 || sudo yum install --assumeyes libarchive-devel.x86_64

This way won't try to install libarchive at each make

Rodrigo Gurgel
  • 1,696
  • 2
  • 15
  • 32