Home | History | Annotate | Line # | Download | only in mk
bsd.nls.mk revision 1.8
      1 #	$NetBSD: bsd.nls.mk,v 1.8 1997/05/07 16:46:07 mycroft 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 .PHONY:		cleannls nlsinstall
     11 install:	nlsinstall
     12 cleandir:	cleannls
     13 
     14 .SUFFIXES: .cat .msg
     15 
     16 .msg.cat:
     17 	@rm -f ${.TARGET}
     18 	gencat ${.TARGET} ${.IMPSRC}
     19 
     20 .if defined(NLS) && !empty(NLS)
     21 NLSALL= ${NLS:.msg=.cat}
     22 .endif
     23 
     24 .if !defined(NLSNAME)
     25 .if defined(PROG)
     26 NLSNAME=${PROG}
     27 .else
     28 NLSNAME=lib${LIB}
     29 .endif
     30 .endif
     31 
     32 .if defined(NLSALL)
     33 all: ${NLSALL}
     34 
     35 cleannls:
     36 	rm -f ${NLSALL}
     37 
     38 .for F in ${NLSALL}
     39 nlsinstall:: ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat
     40 .if !defined(UPDATE)
     41 .PHONY: ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat
     42 .endif
     43 .if !defined(BUILD)
     44 ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: .MADE
     45 .endif
     46 
     47 .PRECIOUS: ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat
     48 ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat: ${F}
     49 	${INSTALL} -d ${.TARGET:H}
     50 	${INSTALL} ${COPY} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} ${.ALLSRC} \
     51 		${.TARGET}
     52 .endfor
     53 .else
     54 cleannls:
     55 .endif
     56 
     57 .if !target(nlsinstall)
     58 nlsinstall::
     59 .endif
     60