When using the perl5 extensions, ask perl itself what the pathnames are,

don't just hard code them into the Makefile.

(This is the optional stuff to use perl scripts as a vi scripting language.
 eg, to load a sample script, type:   :perl do 'wc.pl';
 this loads /usr/share/vi/perl/wc.pl to add the "wc" command. Then, one can
 do this:   :perl wc   Yes, this is a trivial example. There are more
 useful examples, eg 'make' output parsing along the lines of emacs's
 "compile" mode.  The tcl extension is similar and enabled by default since
 we ship with tcl.)
This commit is contained in:
peter 1996-12-30 09:24:19 +00:00
parent a334cda535
commit 2bfd97fd32

View File

@ -1,5 +1,5 @@
# #
# $Id: Makefile,v 1.9 1996/11/21 10:13:25 ache Exp $ # $Id: Makefile,v 1.10 1996/12/08 14:05:08 ache Exp $
# #
# This has most of the glue needed to compile tknvi and the perl hooks, # This has most of the glue needed to compile tknvi and the perl hooks,
# but not all. # but not all.
@ -15,10 +15,15 @@ APISTUFF= ex_notcl.c ex_noperl.c
.else .else
TCLINTERP= yes #fine, in base tree, little cost TCLINTERP= yes #fine, in base tree, little cost
#TKNVI= tknvi #not ready, needs X11, tk, doesn't quite work yet #TKNVI= yes #not ready, needs X11, tk, doesn't quite work yet
#PERLINTERP= yes #needs the perl5 v5.003 port #PERLINTERP= yes #needs the perl5 v5.003 port
APISTUFF= ex_tcl.c ex_perl.c APISTUFF= ex_tcl.c ex_perl.c
# Any better ideas?
#PERL= /usr/local/bin/perl5.003
#CFLAGS+= -DHAVE_PERL_5_003_01 # If perl >= 5.03.01
.endif .endif
#if using ncurses: #if using ncurses:
@ -73,12 +78,16 @@ CFLAGS+= -DHAVE_TCL_INTERP
.if defined(PERLINTERP) .if defined(PERLINTERP)
.PATH: ${SRCDIR}/perl_api .PATH: ${SRCDIR}/perl_api
LDADD+= /usr/local/lib/perl5/i386-freebsd/5.003/auto/DynaLoader/DynaLoader.a \
-L/usr/local/lib/perl5/i386-freebsd/5.003/CORE -lperl -lcrypt # Perl "knows" how to compile it's components. Ask it for details...
CFLAGS+= -DHAVE_PERL_INTERP -I/usr/local/lib/perl5/i386-freebsd/5.003/CORE PERLLIB!= ${PERL} -MConfig -e 'print $$Config{privlib}'
#CFLAGS+= -DHAVE_PERL_5_003_01 # If perl >= 5.03.01 PERLCPPFLAGS!= cd ${SRCDIR}/build; ${PERL} -MExtUtils::Embed -e 'ccflags;perl_inc'
PERL= /usr/local/bin/perl5.003 PERLLIBS!= cd ${SRCDIR}/build; ${PERL} -MExtUtils::Embed -e 'ldopts'
PERLLIB=/usr/local/lib/perl5 PERLLDFLAGS!= cd ${SRCDIR}/build; ${PERL} -MExtUtils::Embed -e 'ccdlflags'
LDADD+= ${PERLLDFLAGS} ${PERLLIBS}
CFLAGS+= -DHAVE_PERL_INTERP ${PERLCPPFLAGS}
.endif .endif
CLEANFILES+=${EX} CLEANFILES+=${EX}