Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: static linking of modules



>I wander how portable this .force suffix rule.  Agre you sure that it will
>not cause problems?

I've never seen it fail on any make.  Its semantics are well defined.
The only tricky bit is that GNU make has a bug that means the commands
in the implicit rule mustn't be empty (hence the "@:").

>  bltinmods.list: $(MODBINS)
>! 	$(SED) -n 's/^\(.*\)$$/DOMOD(mod_boot_\1, mod_cleanup_\1)/p' $(MODBINS) > bltinmods.list

This requires that the $(MODBINS) file have one module per line, with
no extra spaces.  This is not an unreasonable requirement, but my
method did allow it to be quite free-form.

>! $(MODBINS):
>! 	test -f $(MODBINS) || touch $(MODBINS)

This means that $(MODBINS) mustn't be in $(srcdir).

>! 	    $(MAKE) $(MAKEDEFS) DEFS="$(DEFS) -Dmod_boot=mod_boot_$$mod -Dmod_cleanup=mod_cleanup_$$mod" $$obj; \

An earlier version of my patch used this method.  I don't like it,
because it makes it impossible to just build the object file for one
compiled-in module alone.  Still, that's not often required, so it's
not really a problem.

-zefram



Messages sorted by: Reverse Date, Date, Thread, Author