zsh-workers
 help / color / mirror / code / Atom feed
* Where to add extra libraries for modules
@ 2001-07-22  1:50 Fletch
  2001-07-22  5:08 ` Andrej Borsenkow
  2001-07-23 16:31 ` Bart Schaefer
  0 siblings, 2 replies; 6+ messages in thread
From: Fletch @ 2001-07-22  1:50 UTC (permalink / raw)
  To: zsh-workers


        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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-07-30 15:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-22  1:50 Where to add extra libraries for modules Fletch
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

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).