Home | History | Annotate | Line # | Download | only in mk
bsd.nls.mk revision 1.11
      1 #	$NetBSD: bsd.nls.mk,v 1.11 1998/04/03 04:40:42 enami Exp $
      2 
      3 .if !target(__initialized__)
      4 __initialized__:
      5 .if exists(${.CURDIR}/../Makefile.inc)
      6 .include "${.CURDIR}/../Makefile.inc"
      7 .endif
      8 
      9 .MAIN:		all
     10 .endif
     11 .PHONY:		cleannls nlsinstall
     12 .if !defined(NONLS)
     13 realinstall:	nlsinstall
     14 .endif
     15 cleandir:	cleannls
     16 
     17 .SUFFIXES: .cat .msg
     18 
     19 .msg.cat:
     20 	@rm -f ${.TARGET}
     21 	gencat ${.TARGET} ${.IMPSRC}
     22 
     23 .if defined(NLS) && !empty(NLS)
     24 NLSALL= ${NLS:.msg=.cat}
     25 .endif
     26 
     27 .if !defined(NLSNAME)
     28 .if defined(PROG)
     29 NLSNAME=${PROG}
     30 .else
     31 NLSNAME=lib${LIB}
     32 .endif
     33 .endif
     34 
     35 .if defined(NLSALL)
     36 .if !defined(NONLS)
     37 all: ${NLSALL}
     38 .endif
     39 
     40 cleannls:
     41 	rm -f ${NLSALL}
     42 
     43 .for F in ${NLSALL}
     44 nlsinstall:: ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat
     45 .if !defined(UPDATE)
     46 .PHONY: ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat
     47 .endif
     48 .if !defined(BUILD)
     49 ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: .MADE
     50 .endif
     51 
     52 .PRECIOUS: ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat
     53 ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: ${F}
     54 	${INSTALL} -d ${.TARGET:H}
     55 	${INSTALL} ${COPY} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} ${.ALLSRC} \
     56 		${.TARGET}
     57 .endfor
     58 .else
     59 cleannls:
     60 .endif
     61 
     62 .if !target(nlsinstall)
     63 nlsinstall::
     64 .endif
     65