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

Add option to suppress make output #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion elevation/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import fasteners

SUPPRESS_OUTPUT = False
FOLDER_LOCKFILE_NAME = '.folder_lock'


Expand Down Expand Up @@ -84,6 +85,9 @@ def check_call_make(path, targets=(), variables=()):
make_targets = ' '.join(targets)
variables_items = collections.OrderedDict(variables).items()
make_variables = ' '.join('%s="%s"' % (k.upper(), v) for k, v in variables_items)
cmd = 'make -C {path} {make_targets} {make_variables}'.format(**locals())
cmd = 'make '
if SUPPRESS_OUTPUT:
cmd += '-s '
cmd += '-C {path} {make_targets} {make_variables}'.format(**locals())
subprocess.check_call(cmd, shell=True)
return cmd