Commits

Shlomi Fish committed 4046793

Makefile.PL now respects the CC env var.

Comments (0)

Files changed (2)

 Revision history for Perl extension XML::LibXML
 
+    - Add a way to specify a different compiler to be used in the
+    "Makefile" by calling Makefile.PL with the CC environment variable
+    set to the path to the alternate compiler.
+        - This way we can use ŤCC=/usr/bin/clang perl Makefile.PLť
+        in order to compile faster.
+
 2.0003          Fri 27 Jul 17:11:21 IDT 2012
     - Patch to a potential NULL dereference in xpath.c.
         - Thanks to Ville Skyttä <ville.skytta@iki.fi> and cppcheck.
             "xs",
         ],
     },
-            );
+);
 # -------------------------------------------------------------------------- #
 # -------------------------------------------------------------------------- #
 
 
 # echo perl -pi~ -e '$$_=q($(version))."\n" if /#\ VERSION TEMPLATE/ ' $(TO_INST_PM)
 sub MY::postamble {
-  return <<'MAKE_FRAG';
+
+    my $CC =
+    (
+        exists($ENV{CC})
+            ? "CC = $ENV{CC}"
+            : ''
+    );
+
+  return "$CC\n\n" . <<'MAKE_FRAG';
 
 # used to update version numbers in all modules
 version: