summaryrefslogtreecommitdiff
path: root/mk/wrapper/arg-source
diff options
context:
space:
mode:
authorkhorben <khorben>2016-03-13 15:32:06 +0000
committerkhorben <khorben>2016-03-13 15:32:06 +0000
commitb9cb16993eec5667ed3c194119432899bb2ae2ae (patch)
tree03e284e492c84da1e66da01f3279913bfda4f4ac /mk/wrapper/arg-source
parent9ecaa9610861653748fde89e62f42abb0b8936ef (diff)
downloadpkgsrc-b9cb16993eec5667ed3c194119432899bb2ae2ae.tar.gz
Also determine when compiling from source files
This allows fixing an issue with PKGSRC_MKPIE, where "gcc source.c" would not work. Some packages rely on this test to determine if a working compiler is available.
Diffstat (limited to 'mk/wrapper/arg-source')
-rw-r--r--mk/wrapper/arg-source12
1 files changed, 11 insertions, 1 deletions
diff --git a/mk/wrapper/arg-source b/mk/wrapper/arg-source
index 476de2de56b..803f5deddcd 100644
--- a/mk/wrapper/arg-source
+++ b/mk/wrapper/arg-source
@@ -1,4 +1,4 @@
-# $NetBSD: arg-source,v 1.17 2016/03/11 23:03:31 khorben Exp $
+# $NetBSD: arg-source,v 1.18 2016/03/13 15:32:06 khorben Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -171,6 +171,16 @@ while $test $# -gt 0; do
$debug_log $wrapperlog " (arg-source) push: $arg"
;;
##############################################################
+ # Determine if we are compiling anything from source.
+ ##############################################################
+ *.C|*.CPP|*.c|*.c++|*.cc|*.cp|*.cpp|*.cxx|*.go|\
+ *.H|*.HPP|*.h|*.h++|*.hh|*.hp|*.hpp|*.hxx|*.i|*.ii|\
+ *.M|*.m|*.mi|*.mii|*.mm|*.S|*.s|*.sx|*.tcc)
+ has_source=yes
+ append_queue argbuf "$arg"
+ $debug_log $wrapperlog " (arg-source) push: $arg"
+ ;;
+ ##############################################################
# For everything else, just queue it up.
##############################################################
*)