diff options
author | John Ankarström <john@ankarstrom.se> | 2021-06-07 14:12:11 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-06-07 14:12:11 +0200 |
commit | e2294b61e15781ca784a611e8ca7dabe132ebc6d (patch) | |
tree | c2a8cc44582534f52a76b1b8e64e6f83ffa501da /Makefile | |
download | ksh-e2294b61e15781ca784a611e8ca7dabe132ebc6d.tar.gz |
First commit (NetBSD 9.1)
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..892f59b --- /dev/null +++ b/Makefile @@ -0,0 +1,55 @@ +# $NetBSD: Makefile,v 1.35 2019/02/04 04:05:15 mrg Exp $ + +WARNS=3 +CWARNFLAGS.clang+= -Wno-error=cast-qual + +.include <bsd.own.mk> + +CPPFLAGS+= -I. + +PROG= ksh +SRCS= alloc.c c_ksh.c c_sh.c c_test.c c_ulimit.c edit.c emacs.c \ + eval.c exec.c expr.c history.c io.c jobs.c lex.c mail.c \ + main.c misc.c path.c shf.c syn.c table.c trap.c tree.c tty.c \ + var.c version.c vi.c +DPSRCS= emacs.out siglist.out +.if (${MKMAN} != "no") +DPSRCS+=ksh.1 +.endif + +# needs tbl for the man page. +USETBL= + +# Environment for scripts executed during build. +SCRIPT_ENV= \ + AWK=${TOOL_AWK:Q} \ + SED=${TOOL_SED:Q} + +CLEANFILES+= siglist.out siglist.out.tmp +# two steps to prevent the creation of a bogus siglist.out +siglist.out: config.h sh.h siglist.in siglist.sh + ${_MKTARGET_CREATE} + ${SCRIPT_ENV} \ + ${HOST_SH} $(.CURDIR)/siglist.sh "$(CC) -E $(CPPFLAGS) $(DEFS) -I. -I$(.CURDIR)" < $(.CURDIR)/siglist.in > siglist.out.tmp \ + && mv siglist.out.tmp siglist.out + +# two steps to prevent the creation of a bogus emacs.out +CLEANFILES+= emacs.out emacs.out.tmp +emacs.out: emacs.c + ${_MKTARGET_CREATE} + ${SCRIPT_ENV} \ + ${HOST_SH} $(.CURDIR)/emacs-gen.sh $(.CURDIR)/emacs.c > emacs.out.tmp \ + && mv emacs.out.tmp emacs.out + +CLEANFILES+= ksh.1 ksh.1.tmp +ksh.1: ksh.Man mkman + ${_MKTARGET_CREATE} + ${SCRIPT_ENV} \ + ${HOST_SH} $(.CURDIR)/mkman ksh $(.CURDIR)/ksh.Man >ksh.1.tmp \ + && mv ksh.1.tmp ksh.1 + +.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc" +COPTS+= -Wno-error=implicit-fallthrough +.endif + +.include <bsd.prog.mk> |