Tue Dec 9 12:50:24 2014 UTC ()
Use full path for CC, CXX and FC.


(joerg)
diff -r1.15 -r1.16 pkgsrc/mk/cwrappers.mk

cvs diff -r1.15 -r1.16 pkgsrc/mk/cwrappers.mk (switch to unified diff)

--- pkgsrc/mk/cwrappers.mk 2014/11/29 22:20:40 1.15
+++ pkgsrc/mk/cwrappers.mk 2014/12/09 12:50:24 1.16
@@ -1,89 +1,89 @@ @@ -1,89 +1,89 @@
1# $NetBSD: cwrappers.mk,v 1.15 2014/11/29 22:20:40 joerg Exp $ 1# $NetBSD: cwrappers.mk,v 1.16 2014/12/09 12:50:24 joerg Exp $
2# 2#
3# This Makefile fragment implements integration of pkgtools/cwrappers. 3# This Makefile fragment implements integration of pkgtools/cwrappers.
4 4
5BUILD_DEPENDS+= cwrappers>=20141129:../../pkgtools/cwrappers 5BUILD_DEPENDS+= cwrappers>=20141129:../../pkgtools/cwrappers
6 6
7CWRAPPERS_SRC_DIR= ${PREFIX}/libexec/cwrappers 7CWRAPPERS_SRC_DIR= ${PREFIX}/libexec/cwrappers
8CWRAPPERS_BIN_DIR= ${WRKDIR}/.cwrapper/bin 8CWRAPPERS_BIN_DIR= ${WRKDIR}/.cwrapper/bin
9CWRAPPERS_CONFIG_DIR= ${WRKDIR}/.cwrapper/config 9CWRAPPERS_CONFIG_DIR= ${WRKDIR}/.cwrapper/config
10CONFIGURE_ENV+= CWRAPPERS_CONFIG_DIR=${CWRAPPERS_CONFIG_DIR} 10CONFIGURE_ENV+= CWRAPPERS_CONFIG_DIR=${CWRAPPERS_CONFIG_DIR}
11MAKE_ENV+= CWRAPPERS_CONFIG_DIR=${CWRAPPERS_CONFIG_DIR} 11MAKE_ENV+= CWRAPPERS_CONFIG_DIR=${CWRAPPERS_CONFIG_DIR}
12ALL_ENV+= CWRAPPERS_CONFIG_DIR=${CWRAPPERS_CONFIG_DIR} 12ALL_ENV+= CWRAPPERS_CONFIG_DIR=${CWRAPPERS_CONFIG_DIR}
13 13
14# TODO: Fix direct calls to CC and LIBTOOL to provide correct environment. 14# TODO: Fix direct calls to CC and LIBTOOL to provide correct environment.
15.export CWRAPPERS_CONFIG_DIR 15.export CWRAPPERS_CONFIG_DIR
16 16
17CWRAPPERS_CONFIG.as= as 17CWRAPPERS_CONFIG.as= as
18CWRAPPERS_CONFIG.cc= cc 18CWRAPPERS_CONFIG.cc= cc
19CWRAPPERS_CONFIG.cxx= c++ 19CWRAPPERS_CONFIG.cxx= c++
20CWRAPPERS_CONFIG.cpp= cpp 20CWRAPPERS_CONFIG.cpp= cpp
21CWRAPPERS_CONFIG.f77= f77 21CWRAPPERS_CONFIG.f77= f77
22CWRAPPERS_CONFIG.imake= imake 22CWRAPPERS_CONFIG.imake= imake
23CWRAPPERS_CONFIG.ld= ld 23CWRAPPERS_CONFIG.ld= ld
24CWRAPPERS_CONFIG.libtool= libtool 24CWRAPPERS_CONFIG.libtool= libtool
25CWRAPPERS_CONFIG.shlibtool= shlibtool 25CWRAPPERS_CONFIG.shlibtool= shlibtool
26 26
27CWRAPPERS_ALIASES.as= as 27CWRAPPERS_ALIASES.as= as
28CWRAPPERS_ALIASES.cc= cc gcc clang 28CWRAPPERS_ALIASES.cc= cc gcc clang
29CWRAPPERS_ALIASES.cxx= c++ g++ CC cxx clang++ 29CWRAPPERS_ALIASES.cxx= c++ g++ CC cxx clang++
30CWRAPPERS_ALIASES.cpp= cpp clang-cpp 30CWRAPPERS_ALIASES.cpp= cpp clang-cpp
31CWRAPPERS_ALIASES.f77= f77 g77 31CWRAPPERS_ALIASES.f77= f77 g77
32CWRAPPERS_ALIASES.imake= imake 32CWRAPPERS_ALIASES.imake= imake
33CWRAPPERS_ALIASES.ld= ld 33CWRAPPERS_ALIASES.ld= ld
34CWRAPPERS_ALIASES.libtool= libtool 34CWRAPPERS_ALIASES.libtool= libtool
35CWRAPPERS_ALIASES.shlibtool= shlibtool 35CWRAPPERS_ALIASES.shlibtool= shlibtool
36 36
37CWRAPPERS_WRAPPEE.as= ${AS:Ufalse} 37CWRAPPERS_WRAPPEE.as= ${AS:Ufalse}
38CWRAPPERS_WRAPPEE.cxx= ${CXX:Ufalse} 38CWRAPPERS_WRAPPEE.cxx= ${PKG_CXX:Ufalse}
39CWRAPPERS_WRAPPEE.cc= ${CC:Ufalse} 39CWRAPPERS_WRAPPEE.cc= ${PKG_CC:Ufalse}
40CWRAPPERS_WRAPPEE.cpp= ${CPP:Ufalse} 40CWRAPPERS_WRAPPEE.cpp= ${PKG_CPP:Ufalse}
41CWRAPPERS_WRAPPEE.f77= ${F77:Ufalse} 41CWRAPPERS_WRAPPEE.f77= ${PKG_FC:Ufalse}
42CWRAPPERS_WRAPPEE.imake= ${IMAKE:Ufalse} 42CWRAPPERS_WRAPPEE.imake= ${IMAKE:Ufalse}
43CWRAPPERS_WRAPPEE.ld= ${LD:Ufalse} 43CWRAPPERS_WRAPPEE.ld= ${LD:Ufalse}
44CWRAPPERS_WRAPPEE.libtool= ${PKG_LIBTOOL:Ufalse} 44CWRAPPERS_WRAPPEE.libtool= ${PKG_LIBTOOL:Ufalse}
45CWRAPPERS_WRAPPEE.shlibtool= ${PKG_SHLIBTOOL:Ufalse} 45CWRAPPERS_WRAPPEE.shlibtool= ${PKG_SHLIBTOOL:Ufalse}
46 46
47# TODO: Find and fix packages depending on the implicit include path. 47# TODO: Find and fix packages depending on the implicit include path.
48CWRAPPERS_APPEND.cc+= -I${PREFIX}/include 48CWRAPPERS_APPEND.cc+= -I${PREFIX}/include
49CWRAPPERS_APPEND.cxx+= -I${PREFIX}/include 49CWRAPPERS_APPEND.cxx+= -I${PREFIX}/include
50CWRAPPERS_APPEND.cpp+= -I${PREFIX}/include 50CWRAPPERS_APPEND.cpp+= -I${PREFIX}/include
51 51
52.if defined(USE_IMAKE) || !empty(USE_TOOLS:Mimake) 52.if defined(USE_IMAKE) || !empty(USE_TOOLS:Mimake)
53CWRAPPERS_TRANSFORM.imake+= I:${PREFIX}/lib/X11/config:${PREFIX}/lib/X11/config 53CWRAPPERS_TRANSFORM.imake+= I:${PREFIX}/lib/X11/config:${PREFIX}/lib/X11/config
54.endif 54.endif
55 55
56.PHONY: generate-cwrappers 56.PHONY: generate-cwrappers
57 57
58do-wrapper: generate-cwrappers 58do-wrapper: generate-cwrappers
59 59
60generate-cwrappers: 60generate-cwrappers:
61 ${RUN}${MKDIR} ${CWRAPPERS_CONFIG_DIR} ${CWRAPPERS_BIN_DIR} 61 ${RUN}${MKDIR} ${CWRAPPERS_CONFIG_DIR} ${CWRAPPERS_BIN_DIR}
62.for wrappee in as cxx cc cpp f77 imake ld libtool shlibtool 62.for wrappee in as cxx cc cpp f77 imake ld libtool shlibtool
63 ${RUN}echo worklog=${WRKLOG:Q} > ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}} 63 ${RUN}echo worklog=${WRKLOG:Q} > ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
64 ${RUN}echo wrksrc=${WRKSRC:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}} 64 ${RUN}echo wrksrc=${WRKSRC:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
65 ${RUN}case ${wrappee} in *libtool) ;; *) echo path=${_PATH_ORIG:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}};; esac 65 ${RUN}case ${wrappee} in *libtool) ;; *) echo path=${_PATH_ORIG:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}};; esac
66 ${RUN}echo exec_path=${CWRAPPERS_BIN_DIR}/${CWRAPPERS_ALIASES.${wrappee}:[0]} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}} 66 ${RUN}echo exec_path=${CWRAPPERS_BIN_DIR}/${CWRAPPERS_ALIASES.${wrappee}:[0]} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
67 ${RUN}echo exec=${CWRAPPERS_WRAPPEE.${wrappee}:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}} 67 ${RUN}echo exec=${CWRAPPERS_WRAPPEE.${wrappee}:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
68. for cmd in ${WRAPPER_REORDER_CMDS} 68. for cmd in ${WRAPPER_REORDER_CMDS}
69 ${RUN}echo reorder=${cmd:S/^reorder://:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}} 69 ${RUN}echo reorder=${cmd:S/^reorder://:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
70. endfor 70. endfor
71. for cmd in ${CWRAPPERS_TRANSFORM.${wrappee}} ${_CWRAPPERS_TRANSFORM} 71. for cmd in ${CWRAPPERS_TRANSFORM.${wrappee}} ${_CWRAPPERS_TRANSFORM}
72 ${RUN}echo transform=${cmd:u:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}} 72 ${RUN}echo transform=${cmd:u:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
73. endfor 73. endfor
74. for cmd in ${CWRAPPERS_APPEND.${wrappee}:U} 74. for cmd in ${CWRAPPERS_APPEND.${wrappee}:U}
75 ${RUN}echo append=${cmd:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}} 75 ${RUN}echo append=${cmd:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
76. endfor 76. endfor
77. for cmd in ${_CWRAPPERS_UNWRAP} 77. for cmd in ${_CWRAPPERS_UNWRAP}
78 ${RUN}echo unwrap=${cmd:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}} 78 ${RUN}echo unwrap=${cmd:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
79. endfor 79. endfor
80. for alias in ${CWRAPPERS_ALIASES.${wrappee}} 80. for alias in ${CWRAPPERS_ALIASES.${wrappee}}
81 ${RUN}ln -s ${CWRAPPERS_SRC_DIR}/${CWRAPPERS_CONFIG.${wrappee}}-wrapper ${CWRAPPERS_BIN_DIR}/${alias} 81 ${RUN}ln -s ${CWRAPPERS_SRC_DIR}/${CWRAPPERS_CONFIG.${wrappee}}-wrapper ${CWRAPPERS_BIN_DIR}/${alias}
82. endfor 82. endfor
83.endfor 83.endfor
84 84
85.if defined(USE_LIBTOOL) 85.if defined(USE_LIBTOOL)
86_LIBTOOL= ${CWRAPPERS_BIN_DIR}/libtool 86_LIBTOOL= ${CWRAPPERS_BIN_DIR}/libtool
87_SHLIBTOOL= ${CWRAPPERS_BIN_DIR}/shlibtool 87_SHLIBTOOL= ${CWRAPPERS_BIN_DIR}/shlibtool
88.endif 88.endif
89PREPEND_PATH+= ${CWRAPPERS_BIN_DIR} 89PREPEND_PATH+= ${CWRAPPERS_BIN_DIR}