2004-02-29 21:46:43 +03:00
|
|
|
# $NetBSD: Makefile.inc,v 1.34 2004/02/29 18:46:43 jschauma Exp $
|
1997-10-22 06:17:11 +04:00
|
|
|
#
|
2003-05-16 23:25:24 +04:00
|
|
|
# Makefile for sysinst
|
1997-09-27 03:02:53 +04:00
|
|
|
|
2001-12-12 03:05:09 +03:00
|
|
|
PROG= sysinst
|
|
|
|
NOMAN= # defined
|
2000-03-25 00:56:04 +03:00
|
|
|
|
2003-06-28 02:20:14 +04:00
|
|
|
SYSINSTLANG?= en
|
2004-02-29 21:46:43 +03:00
|
|
|
LANGUAGES?= de en fr pl
|
2003-06-28 02:20:14 +04:00
|
|
|
|
2003-05-16 23:25:24 +04:00
|
|
|
MSG_MD?= msg.md.${SYSINSTLANG}
|
|
|
|
MENUS_MD?= menus.md.${SYSINSTLANG}
|
|
|
|
|
2003-10-26 10:25:33 +03:00
|
|
|
.include <bsd.sys.mk> # for HOST_SH
|
2001-12-12 03:05:09 +03:00
|
|
|
.include <bsd.own.mk> # for mk.conf
|
2004-02-02 21:43:39 +03:00
|
|
|
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
|
1997-09-27 03:02:53 +04:00
|
|
|
|
2003-12-01 04:11:57 +03:00
|
|
|
_MKSHTARGET_CREATE?= ${_MKSHMSG_CREATE} ${.CURDIR:T}/${.TARGET}
|
2003-11-20 16:13:38 +03:00
|
|
|
|
2002-04-11 22:14:18 +04:00
|
|
|
DPADD= ${LIBCURSES} ${LIBTERMCAP} ${LIBUTIL}
|
2001-12-12 03:05:09 +03:00
|
|
|
LDADD= -lcurses -ltermcap -lutil
|
|
|
|
LDSTATIC?= -static
|
1997-09-27 03:02:53 +04:00
|
|
|
|
2003-05-16 23:25:24 +04:00
|
|
|
UNIF_AWK= ${.CURDIR}/../../unif.awk
|
2003-06-28 02:20:14 +04:00
|
|
|
MSG_XLAT_SH= ${.CURDIR}/../../msg_xlat.sh
|
2003-05-16 23:25:24 +04:00
|
|
|
|
2001-12-12 03:05:09 +03:00
|
|
|
CPPFLAGS+= -I. -I${.CURDIR}/../.. -I${.CURDIR} \
|
2004-02-02 21:43:39 +03:00
|
|
|
-DREL=\"${DISTRIBVER}\" -DMACH=\"${MACHINE}\"
|
1997-09-27 03:02:53 +04:00
|
|
|
|
2002-10-17 06:05:35 +04:00
|
|
|
.if defined(SMALLPROG_INET6)
|
|
|
|
CPPFLAGS+=-DINET6
|
|
|
|
.endif
|
|
|
|
|
2002-06-06 13:53:22 +04:00
|
|
|
|
|
|
|
# Host to ftp from. Default:
|
2003-07-26 21:06:22 +04:00
|
|
|
# "ftp.NetBSD.org"
|
2002-06-06 13:53:22 +04:00
|
|
|
#
|
2000-03-25 00:56:04 +03:00
|
|
|
.if defined(SYSINST_FTP_HOST)
|
2002-06-06 13:53:22 +04:00
|
|
|
CPPFLAGS+= -DSYSINST_FTP_HOST=\"${SYSINST_FTP_HOST}\"
|
2000-03-25 00:56:04 +03:00
|
|
|
.endif
|
|
|
|
|
2002-06-06 13:53:22 +04:00
|
|
|
# Top-level ftp directory. Default:
|
|
|
|
# "pub/NetBSD/NetBSD-" + VER + "/" + MACH
|
|
|
|
#
|
2000-03-25 00:56:04 +03:00
|
|
|
.if defined(SYSINST_FTP_DIR)
|
2002-06-06 13:53:22 +04:00
|
|
|
CPPFLAGS+= -DSYSINST_FTP_DIR=\"${SYSINST_FTP_DIR}\"
|
2000-03-25 00:56:04 +03:00
|
|
|
.endif
|
|
|
|
|
2002-06-06 13:53:22 +04:00
|
|
|
# Top-level CDROM directory. Default:
|
|
|
|
# "/" + MACH
|
|
|
|
#
|
|
|
|
.if defined(SYSINST_CDROM_DIR)
|
|
|
|
CPPFLAGS+= -DSYSINST_CDROM_DIR=\"${SYSINST_CDROM_DIR}\"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
|
2003-07-25 12:26:21 +04:00
|
|
|
WARNS= 3
|
1997-09-27 03:02:53 +04:00
|
|
|
|
2003-08-02 09:16:56 +04:00
|
|
|
DPSRCS+= msg_defs.h menu_defs.h
|
|
|
|
|
2001-12-12 03:05:09 +03:00
|
|
|
CLEANFILES= menu_defs.c menu_defs.h menus.def \
|
2003-06-28 02:20:14 +04:00
|
|
|
msg_defs.c msg_defs.h msg.def msgtouch \
|
|
|
|
sysinstmsgs.*
|
1997-09-27 03:02:53 +04:00
|
|
|
|
|
|
|
.PATH: ${.CURDIR}/../..
|
|
|
|
|
2003-11-20 16:13:38 +03:00
|
|
|
menu_defs.h: menu_defs.c
|
|
|
|
[ -f ${.TARGET} ] || { \
|
|
|
|
${_MKSHTARGET_CREATE}; \
|
|
|
|
${TOOL_MENUC} menus.def; \
|
|
|
|
}
|
|
|
|
menu_defs.c: menus.def
|
|
|
|
${_MKTARGET_CREATE}
|
|
|
|
[ ! -f menu_defs.h ] || mv -f menu_defs.h menu_defs.oh
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_MENUC} menus.def
|
2003-11-20 16:13:38 +03:00
|
|
|
! cmp -s menu_defs.oh menu_defs.h || mv -f menu_defs.oh menu_defs.h
|
|
|
|
@rm -f menu_defs.oh
|
|
|
|
|
|
|
|
msg_defs.h: msg_defs.c
|
|
|
|
[ -f ${.TARGET} ] || { \
|
|
|
|
${_MKSHTARGET_CREATE}; \
|
|
|
|
${TOOL_MSGC} msg.def; \
|
|
|
|
}
|
|
|
|
msg_defs.c: msg.def
|
|
|
|
${_MKTARGET_CREATE}
|
|
|
|
[ ! -f msg_defs.h ] || mv -f msg_defs.h msg_defs.oh
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_MSGC} msg.def
|
2003-11-20 16:13:38 +03:00
|
|
|
! cmp -s msg_defs.oh msg_defs.h || mv -f msg_defs.oh msg_defs.h
|
|
|
|
@rm -f msg_defs.oh
|
1997-09-27 03:02:53 +04:00
|
|
|
|
2000-12-17 12:22:47 +03:00
|
|
|
# Needed to get proper dependency checks on osrelease
|
2004-02-02 21:43:39 +03:00
|
|
|
msgtouch: ${DISTRIBVERDEP}
|
2000-12-17 12:22:47 +03:00
|
|
|
touch ${.TARGET}
|
|
|
|
|
2003-05-16 23:25:24 +04:00
|
|
|
msg.def: msg.mi.${SYSINSTLANG} ${MSG_MD} msgtouch
|
2003-11-20 16:13:38 +03:00
|
|
|
${_MKTARGET_CREATE}
|
2003-05-16 23:25:24 +04:00
|
|
|
sed "s/@@VERSION@@/${VER}/" ${.ALLSRC} | \
|
|
|
|
awk -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" > ${.TARGET}
|
1997-09-27 03:02:53 +04:00
|
|
|
|
2003-06-27 17:36:04 +04:00
|
|
|
menus.def: menus.mi ${MENUS_MD} msgtouch
|
2003-11-20 16:13:38 +03:00
|
|
|
${_MKTARGET_CREATE}
|
2003-05-16 23:25:24 +04:00
|
|
|
sed "s/@@VERSION@@/${VER}/" ${.ALLSRC} | \
|
|
|
|
awk -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" > ${.TARGET}
|
1997-09-27 03:02:53 +04:00
|
|
|
|
2003-08-27 14:23:53 +04:00
|
|
|
.for LANG in ${LANGUAGES:N${SYSINSTLANG}}
|
2003-06-28 02:20:14 +04:00
|
|
|
sysinstmsgs.${LANG}: msg.mi.${LANG} ${MSG_MD:S/.${SYSINSTLANG}$/.${LANG}/} msgtouch msg_defs.h
|
2003-11-20 16:13:38 +03:00
|
|
|
${_MKTARGET_CREATE}
|
2003-06-28 02:20:14 +04:00
|
|
|
sed "s/@@VERSION@@/${VER}/" ${.ALLSRC:M*.${LANG}} | \
|
|
|
|
awk -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" | \
|
2003-10-26 10:25:33 +03:00
|
|
|
${HOST_SH} ${MSG_XLAT_SH} > ${.TARGET}
|
2003-06-28 02:20:14 +04:00
|
|
|
|
2003-08-02 09:16:56 +04:00
|
|
|
DPSRCS+= sysinstmsgs.${LANG}
|
2003-06-28 02:20:14 +04:00
|
|
|
.endfor
|
|
|
|
|
2003-08-02 09:16:56 +04:00
|
|
|
.include <bsd.prog.mk>
|