Skip to content

Instantly share code, notes, and snippets.

Benjamin Fuchs benjaminfuchs

Block or report user

Report or block benjaminfuchs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
import subprocess
import tempfile
import os
import re
from string import Template
STRING = """
#include <iostream>
#include <string>
benjaminfuchs / gist:f05053067e723cf02a3272f341363da9
Last active Aug 10, 2017
Add prefix to GNU make shell output
View gist:f05053067e723cf02a3272f341363da9
SHELL=/bin/bash -c 'eval $$0 $$@ 2>&1 | stdbuf -oL sed "s/^/[$@] /"'
View gist:d2bdc6317ec5920d0559ad174c15eeaa
# Prints all targets of the Makefile
.PHONY: help
@make --print-data-base --question | \
grep -v -e '^Makefile' | \
awk '/^[^.%][-A-Za-z0-9_]*:/ \
{ print substr($$1, 1, length($$1)-1) }' | \
sort | \
pr --omit-pagination --width=80 --columns=3 \
You can’t perform that action at this time.