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