require 'formula' class Dtach instead of "config.h", so "." needs to be in the include path. ENV.append "CFLAGS", "-I." inreplace "Makefile" do |f| # Use our own flags, thanks. %w[CC CFLAGS LIBS].each { |flag| f.change_make_var! flag, "" } end system "make" bin.install "dtach" end end