Makefile revision 1.38
1# $NetBSD: Makefile,v 1.38 2024/12/05 22:40:02 rillig Exp $ 2 3WARNS= 3 4CWARNFLAGS.clang+= -Wno-error=cast-qual 5 6.include <bsd.own.mk> 7 8CPPFLAGS+= -I. 9 10PROG= ksh 11SRCS= alloc.c c_ksh.c c_sh.c c_test.c c_ulimit.c edit.c emacs.c \ 12 eval.c exec.c expr.c history.c io.c jobs.c lex.c mail.c \ 13 main.c misc.c path.c shf.c syn.c table.c trap.c tree.c tty.c \ 14 var.c version.c vi.c 15DPSRCS= emacs.out siglist.out 16.if ${MKMAN} != "no" 17DPSRCS+=ksh.1 18.endif 19 20USETBL= # yes, needed for the man page. 21 22# Environment for scripts executed during build. 23SCRIPT_ENV= \ 24 AWK=${TOOL_AWK:Q} \ 25 SED=${TOOL_SED:Q} 26 27CLEANFILES+= siglist.out siglist.out.tmp 28# two steps to prevent the creation of a bogus siglist.out 29siglist.out: config.h sh.h siglist.in siglist.sh 30 ${_MKTARGET_CREATE} 31 ${SCRIPT_ENV} \ 32 ${HOST_SH} ${.CURDIR}/siglist.sh "${CC} -E ${CPPFLAGS} ${DEFS} \ 33 -I. -I${.CURDIR}" < ${.CURDIR}/siglist.in > siglist.out.tmp \ 34 && mv siglist.out.tmp siglist.out 35 36# two steps to prevent the creation of a bogus emacs.out 37CLEANFILES+= emacs.out emacs.out.tmp 38emacs.out: emacs.c 39 ${_MKTARGET_CREATE} 40 ${SCRIPT_ENV} \ 41 ${HOST_SH} ${.CURDIR}/emacs-gen.sh ${.CURDIR}/emacs.c > emacs.out.tmp \ 42 && mv emacs.out.tmp emacs.out 43 44CLEANFILES+= ksh.1 ksh.1.tmp 45ksh.1: ksh.Man mkman 46 ${_MKTARGET_CREATE} 47 ${SCRIPT_ENV} \ 48 ${HOST_SH} ${.CURDIR}/mkman ksh ${.CURDIR}/ksh.Man >ksh.1.tmp \ 49 && mv ksh.1.tmp ksh.1 50 51COPTS+= ${CC_WNO_IMPLICIT_FALLTHROUGH} 52 53.include <bsd.prog.mk> 54