From 0aa35985b9d69be99b99b6d4d184b31c7e33e798 Mon Sep 17 00:00:00 2001 From: Alexey Zelkin Date: Mon, 4 Mar 2002 12:27:00 +0000 Subject: [PATCH] . Add support for making NLS links . Target definitions tweaks --- share/mk/bsd.nls.mk | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/share/mk/bsd.nls.mk b/share/mk/bsd.nls.mk index ceb822ee500..ab76f2d3b72 100644 --- a/share/mk/bsd.nls.mk +++ b/share/mk/bsd.nls.mk @@ -37,6 +37,7 @@ NLSMODE?= ${NOBINMODE} NLSOWN?= ${SHAREOWN} NLS?= +NLSLINKS= .MAIN: all @@ -62,6 +63,10 @@ ${file}: cat ${NLSSRCDIR_${file}}/${NLSSRCFILES_${file}} > ${.TARGET} CLEANFILES+= ${file} .endif + +.if defined(NLSLINKS_${file:C/.msg//g}) && !empty(NLSLINKS_${file:C/.msg//g}) +NLSLINKS+= ${file:C/.msg//g} +.endif .endfor # @@ -85,6 +90,16 @@ nlsinstall:: ${_F} .PRECIOUS: ${_F} # keep if install fails .endfor +links-nls: +.if defined(NLSLINKS) && !empty(NLSLINKS) +.for src in ${NLSLINKS} +.for dst in ${NLSLINKS_${src}} + ln -fs ../${src}/${NLSNAME}.cat \ + ${DESTDIR}${NLSDIR}/${dst}/${NLSNAME}.cat +.endfor +.endfor +.endif + # .if !defined(NO_NLS) && !empty(NLS) @@ -93,8 +108,14 @@ all-nls: ${NLSALL} all-nls: .endif +.if !defined(NO_NLS) && !empty(NLS) +realinstall: beforeinstall nlsinstall links-nls +.else +realinstall: beforeinstall +.endif + all: all-nls _SUBDIR -install: beforeinstall nlsinstall afterinstall +install: realinstall afterinstall .if !target(distribute) distribute: