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