zsh-workers
 help / color / mirror / code / Atom feed
From: Fletch <fletch@phydeaux.org>
To: zsh-workers@sunsite.dk
Subject: Where to add extra libraries for modules
Date: 21 Jul 2001 21:50:51 -0400	[thread overview]
Message-ID: <m2y9phybno.fsf@freebie.phydeaux.org> (raw)


        I've all but got my perl-in-zsh module working with 4.0.2
again, but I've got an issue with where I should be adding in the
commands to link against the perl libraries.


        There's a perl module `ExtUtils::Embed' that provides commands
`ccopts' and `ldopts' that print out the required compiler flags and
linker options (similar to the gtk+ `gtk-config --libs').  I've got a
zperl.mdd file that's adding stuff to the Makefile like so:


---->8 zperl.mdd 8<----
name=xzperl
link=dynamic
load=no

objects="zperl.o perlxsi.o"

autobins="zperl"

:<<\Make
zperl.$(DL_EXT): $(MODDOBJS_zperl) zperl.export  $(dir_top)/Src/zsh.export $(NOLINKMODS_zperl)
	rm -f $@
	$(DLLINK) $(NXPIMP_zperl) $(NNTRYOPT) $(MODDOBJS_zperl) $(NOLINKMODS_zperl) $(LIBS) \
	   `perl -MExtUtils::Embed -e ldopts`

zperl.$(ANSIOBJ): zperl.c
	$(DLCOMPILE) `perl -MExtUtils::Embed -e ccopts` -o $@ $<

zperl$(ANSIOBJ): zperl.c
	$(COMPILE) `perl -MExtUtils::Embed -e ccopts` -o $@ $<
	@rm -f $(dir_src)/stamp-modobjs

perlxsi.$(ANSIOBJ): perlxsi.c
	$(DLCOMPILE) `perl -MExtUtils::Embed -e ccopts` -o $@ $<

perlxsi$(ANSIOBJ): perlxsi.c
	$(COMPILE) `perl -MExtUtils::Embed -e ccopts` -o $@ $<
	@rm -f $(dir_src)/stamp-modobjs

Make
---->8 zperl.mdd 8<----


        The problem is that the mkmakemod.sh script has already spit
out a rule for `zperl.$(DL_EXT)'.  I realize that I could stick the
ldopts invocation in DLLDFLAGS and/or LDFLAGS in the configure script,
but then that'd be including them for every module.  


        Would it make sense (possibly) to add an `extralibs' paramter
in the .mdd and then have mkmakemod.sh include that in the rule for
module.$(DL_EXT)?


-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch@phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
770 933-0600 x211(w)  |  scary questions." -- Jules                =(___)=
                      |                                               U


             reply	other threads:[~2001-07-22  1:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-22  1:50 Fletch [this message]
2001-07-22  5:08 ` Andrej Borsenkow
2001-07-22 15:43   ` Fletch
2001-07-23  4:32     ` Andrej Borsenkow
2001-07-23 16:31 ` Bart Schaefer
2001-07-30 15:25   ` Clint Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2y9phybno.fsf@freebie.phydeaux.org \
    --to=fletch@phydeaux.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).