From f0986e690630edcb8d2716fedd7431dba79aa767 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Tue, 12 Mar 2013 08:16:47 -0500 Subject: doxygen: disable clang warning, fix compilers When compiling in stdenv only, clang would start consuming more and more RAM while spewing invalid-source-encoding warnings. I usually killed the build when it hit 4.5GB. The makefiles also hardcode cc and cxx, so it wasn't using the right compiler in stdenv. --- Library/Formula/doxygen.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/doxygen.rb b/Library/Formula/doxygen.rb index 4b4a919ca..b3530182c 100644 --- a/Library/Formula/doxygen.rb +++ b/Library/Formula/doxygen.rb @@ -22,8 +22,16 @@ class Doxygen < Formula src/Makefile.libdoxycfg tmake/lib/macosx-c++/tmake.conf tmake/lib/macosx-intel-c++/tmake.conf - tmake/lib/macosx-uni-c++/tmake.conf ], - '-Wno-invalid-source-encoding', '' + tmake/lib/macosx-uni-c++/tmake.conf ] do |s| + # otherwise clang may use up large amounts of RAM while + # processing localization files + # gcc doesn't support the flag + s.gsub! '-Wno-invalid-source-encoding', '' \ + unless ENV.compiler == :clang + # makefiles hardcode both cc and c++ + s.gsub! /cc$/, ENV.cc + s.gsub! /c\+\+$/, ENV.cxx + end system "make" # MAN1DIR, relative to the given prefix -- cgit v1.2.3