Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to skip make (and only use make install) #143

Open
sandstrom opened this issue Apr 7, 2016 · 0 comments
Open

Ability to skip make (and only use make install) #143

sandstrom opened this issue Apr 7, 2016 · 0 comments

Comments

@sandstrom
Copy link
Contributor

Many packages don't require make && make install, only make install is needed. Furthermore, some of them will fail when running make (outside a build/dev context).

Being able to run only make install would be a good addition.

  execute "make #{new_resource.path}" do
    command "make #{new_resource.make_opts.join(' ')}"
    not_if { new_resource.only_make_install } # <== added line
    cwd new_resource.path
    environment new_resource.environment
    action :nothing
  end

  execute "make install #{new_resource.path}" do
    command "make install #{new_resource.make_opts.join(' ')}"
    cwd new_resource.path
    environment new_resource.environment
    action :nothing
  end

Another option would be to introduce a :make_target, when specified only that make target would run.

if new_resource.make_target
  execute "make install #{new_resource.path}" do
    command "make #{new_resource.make_target} #{new_resource.make_opts.join(' ')}"
    cwd new_resource.path
    environment new_resource.environment
    action :nothing
  end  
else # ordinary flow
  execute "make #{new_resource.path}" do
    command "make #{new_resource.make_opts.join(' ')}"
    cwd new_resource.path
    environment new_resource.environment
    action :nothing
  end

  execute "make install #{new_resource.path}" do
    command "make install #{new_resource.make_opts.join(' ')}"
    cwd new_resource.path
    environment new_resource.environment
    action :nothing
  end
end

That way, someone needing to run only make install would use :make_target => 'install'.

Someone else may want to check curl and could use :make_target => 'check' (https://github.com/curl/curl/blob/master/Makefile.am#L177).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants