summaryrefslogtreecommitdiffstats
path: root/bin/csh
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2011-02-26 18:54:54 +0000
committerume <ume@FreeBSD.org>2011-02-26 18:54:54 +0000
commit77ef92289dfc91e6451ead240d6b691a678be1a5 (patch)
treee85953e6aca479d45ae22cf5b3596ec7b7a2e770 /bin/csh
parentf7e9054a355f7a2357a86cd09367d2f054df5335 (diff)
downloadFreeBSD-src-77ef92289dfc91e6451ead240d6b691a678be1a5.zip
FreeBSD-src-77ef92289dfc91e6451ead240d6b691a678be1a5.tar.gz
When WITH_ICONV is set, use our in-tree iconv.
Diffstat (limited to 'bin/csh')
-rw-r--r--bin/csh/Makefile36
-rw-r--r--bin/csh/iconv_stub.h (renamed from bin/csh/iconv.h)0
2 files changed, 23 insertions, 13 deletions
diff --git a/bin/csh/Makefile b/bin/csh/Makefile
index d95197b..b63d705 100644
--- a/bin/csh/Makefile
+++ b/bin/csh/Makefile
@@ -76,18 +76,26 @@ NLSLINKS_es_ES.ISO8859-1= es_ES.ISO8859-15
CFLAGS+= -DNO_NLS_CATALOGS
.else
CFLAGS+= -DHAVE_ICONV
+.if ${MK_ICONV} != "no"
+NLSLINKS_de_DE.ISO8859-1 += de_AT.UTF-8 de_CH.UTF-8 de_DE.UTF-8
+NLSLINKS_el_GR.ISO8859-7 = el_GR.UTF-8
+NLSLINKS_es_ES.ISO8859-1 += es_ES.UTF-8
+NLSLINKS_et_EE.ISO8859-15 = et_EE.UTF-8
+NLSLINKS_fi_FI.ISO8859-1 += fi_FI.UTF-8
+NLSLINKS_fr_FR.ISO8859-1 += fr_BE.UTF-8 fr_CA.UTF-8 fr_CH.UTF-8 fr_FR.UTF-8
+NLSLINKS_it_IT.ISO8859-1 += it_CH.UTF-8 it_IT.UTF-8
+NLSLINKS_ja_JP.eucJP = ja_JP.SJIS ja_JP.UTF-8
+NLSLINKS_ru_RU.KOI8-R = ru_RU.CP1251 ru_RU.CP866 ru_RU.ISO8859-5 ru_RU.UTF-8
+NLSLINKS_uk_UA.KOI8-U = uk_UA.ISO8859-5 uk_UA.UTF-8
+.else
+# Above links can be installed from ports/shells/tcsh_nls
+
+GENHDRS+= iconv.h
SRCS+= iconv_stub.c
-# Following links can be installed from ports/shells/tcsh_nls:
-# NLSLINKS_de_DE.ISO8859-1 += de_AT.UTF-8 de_CH.UTF-8 de_DE.UTF-8
-# NLSLINKS_el_GR.ISO8859-7 = el_GR.UTF-8
-# NLSLINKS_es_ES.ISO8859-1 += es_ES.UTF-8
-# NLSLINKS_et_EE.ISO8859-15 = et_EE.UTF-8
-# NLSLINKS_fi_FI.ISO8859-1 += fi_FI.UTF-8
-# NLSLINKS_fr_FR.ISO8859-1 += fr_BE.UTF-8 fr_CA.UTF-8 fr_CH.UTF-8 fr_FR.UTF-8
-# NLSLINKS_it_IT.ISO8859-1 += it_CH.UTF-8 it_IT.UTF-8
-# NLSLINKS_ja_JP.eucJP = ja_JP.SJIS ja_JP.UTF-8
-# NLSLINKS_ru_RU.KOI8-R = ru_RU.CP1251 ru_RU.CP866 ru_RU.ISO8859-5 ru_RU.UTF-8
-# NLSLINKS_uk_UA.KOI8-U = uk_UA.ISO8859-5 uk_UA.UTF-8
+
+iconv.h: ${.CURDIR}/iconv_stub.h
+ cp ${.CURDIR}/iconv_stub.h ${.TARGET}
+.endif
.endif
NLSNAME= tcsh
@@ -105,7 +113,8 @@ build-tools: gethost
gethost: gethost.c sh.err.h tc.const.h sh.h
@rm -f ${.TARGET}
- ${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${TCSHDIR}/gethost.c
+ ${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
+ ${TCSHDIR}/gethost.c
tc.defs.c: gethost ${.CURDIR}/host.defs
@rm -f ${.TARGET}
@@ -133,7 +142,8 @@ tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h
@echo '/* Do not edit this file, make creates it. */' > ${.TARGET}
@echo '#ifndef _h_tc_const' >> ${.TARGET}
@echo '#define _h_tc_const' >> ${.TARGET}
- ${CC} -E ${CFLAGS} ${.ALLSRC} -D_h_tc_const | grep 'Char STR' | \
+ ${CC} -E ${CFLAGS:C/-DHAVE_ICONV//} ${.ALLSRC} -D_h_tc_const | \
+ grep 'Char STR' | \
sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \
sort >> ${.TARGET}
@echo '#endif /* _h_tc_const */' >> ${.TARGET}
diff --git a/bin/csh/iconv.h b/bin/csh/iconv_stub.h
index 89e9d0d..89e9d0d 100644
--- a/bin/csh/iconv.h
+++ b/bin/csh/iconv_stub.h
OpenPOWER on IntegriCloud