summaryrefslogtreecommitdiffstats
path: root/usr.bin/vi
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1996-11-09 16:54:33 +0000
committerjoerg <joerg@FreeBSD.org>1996-11-09 16:54:33 +0000
commitd30fd798cea507d4c9bd782fc86fe32059dabc4c (patch)
tree3d0b110a7ff4891540ce4e2882fb65a888649d1f /usr.bin/vi
parent88d8c0377cc50df0ced7209f9f342e7c3af67066 (diff)
downloadFreeBSD-src-d30fd798cea507d4c9bd782fc86fe32059dabc4c.zip
FreeBSD-src-d30fd798cea507d4c9bd782fc86fe32059dabc4c.tar.gz
Merge from the 2.2 branch: avoid including the API stuff when building
vi for the fixit floppy. Perhaps we'll find a more elegant solution some day, by now it has proven to work reasonably.
Diffstat (limited to 'usr.bin/vi')
-rw-r--r--usr.bin/vi/Makefile27
1 files changed, 23 insertions, 4 deletions
diff --git a/usr.bin/vi/Makefile b/usr.bin/vi/Makefile
index 282df11..9bfc272 100644
--- a/usr.bin/vi/Makefile
+++ b/usr.bin/vi/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile,v 1.5 1996/11/03 21:32:37 peter Exp $
+# $Id: Makefile,v 1.6 1996/11/04 02:52:33 ache Exp $
#
# This has most of the glue needed to compile tknvi and the perl hooks,
# but not all.
@@ -7,10 +7,20 @@
SRCDIR= ${.CURDIR}/../../contrib/nvi
+.if defined(RELEASE_BUILD_FIXIT)
+# When building `vi' for the fixit floppy, don't include any of the
+# API stuff.
+APISTUFF= ex_notcl.c ex_noperl.c
+
+.else
+
TCLINTERP= yes #fine, in base tree, little cost
#TKNVI= tknvi #not ready, needs X11, tk, doesn't quite work yet
#PERLINTERP= yes #needs the perl5 v5.003 port
+APISTUFF= ex_tcl.c ex_perl.c
+.endif
+
#if using ncurses:
#CFLAGS+= -DSYSV_CURSES
@@ -104,11 +114,11 @@ SRCS+= ex.c ex_abbrev.c ex_append.c ex_args.c ex_argv.c ex_at.c ex_bang.c \
ex_cd.c ex_cmd.c ex_cscope.c ex_delete.c ex_display.c \
ex_edit.c ex_equal.c ex_file.c ex_filter.c ex_global.c \
ex_init.c ex_join.c ex_map.c ex_mark.c ex_mkexrc.c ex_move.c \
- ex_open.c ex_perl.c ex_preserve.c ex_print.c ex_put.c ex_quit.c \
+ ex_open.c ex_preserve.c ex_print.c ex_put.c ex_quit.c \
ex_read.c ex_screen.c ex_script.c ex_set.c ex_shell.c \
- ex_shift.c ex_source.c ex_stop.c ex_subst.c ex_tag.c ex_tcl.c \
+ ex_shift.c ex_source.c ex_stop.c ex_subst.c ex_tag.c \
ex_txt.c ex_undo.c ex_usage.c ex_util.c ex_version.c ex_visual.c \
- ex_write.c ex_yank.c ex_z.c
+ ex_write.c ex_yank.c ex_z.c ${APISTUFF}
# Vi source.
SRCS+= getc.c v_at.c v_ch.c v_cmd.c v_delete.c v_ex.c v_increment.c v_init.c \
@@ -132,6 +142,15 @@ perl.c: perl.xs typemap
CLEANFILES+= VI.pm perl.c
.endif
+# unifdef has some *weird* exit codes, sigh! RTFM unifdef(1)...
+ex_notcl.c: ex_tcl.c
+ -unifdef -UHAVE_TCL_INTERP ${SRCDIR}/ex/ex_tcl.c > ${.TARGET}
+
+ex_noperl.c: ex_perl.c
+ -unifdef -UHAVE_PERL_INTERP ${SRCDIR}/ex/ex_perl.c > ${.TARGET}
+
+CLEANFILES+= ex_notcl.c ex_noperl.c
+
afterinstall:
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
${CATALOGS:S;^;${SRCDIR}/catalog/;} \
OpenPOWER on IntegriCloud