G'day,

I'm trying to build IM, CD and IUP on a GNU/Linux system where Lua
and lua-devel files are only available as installed in the system,
not as a private Lua build alongside the IM/CD/IUP source trees.
FWIW, I'm sticking to Lua 5.1 at present, for various reasons.

I find that IUP does build correctly for all targets with this
configuration; the only exception is iupvled.  (I haven't studied
the failure closely, but I believe that this target demands that
the Lua version be compiled in the same tree structure, alongside
the other packages.)

The IUP documentation notes that clients may choose only compile a
subset of all the IUP targets, based on their needs.

So, to simplistically bypass the iupvled build problem, and to give
a Makefile parameter that can help tailor targets, I've added an
EXCLUDE_TARGETS parameter to IUP's top-level Makefile, e.g.:

        make EXCLUDE_TARGETS="iupvled"

Attached is a patch that can be applied to the IUP Makefile, that
implements this facility.

With the patch applied, and iupvled excluded as shown above,
all of IUP builds correctly on my GNU/Linux system.

[Side note: Perhaps something could be applied to IM and CD,
but my impression is that this might be most worthwhile if the
codebase can move to having fewer copies of external libraries,
and relying on dynamic linking instead (e.g. as happened a year
or so with IM and the zlib compression library.  The patch for
each of IM and CD would be trivial to implement; however, my
personal favourite possible use-case is risky, and has much
inertia pushing against it:  I would like to see third-party
libraries withdrawn from the core code tree, if possible; the
one case where this has happened recently is "zlib" in IM.]

cheers,

sur-behoffski (Brenton Hoff)
programmer, Grouse Software
===================================================================
--- Makefile	(revision 5619)
+++ Makefile	(working copy)
@@ -2,9 +2,13 @@
   WINLIBS = iupole iupfiledlg
 endif
 
-.PHONY: do_all iup iupgtk iupmot iupcd iupcontrols iupgl iupglcontrols iup_plot iup_mglplot iup_scintilla iupim iupimglib ledc iupview iupvled iuplua5 iupluaconsole iupluascripter iupole iupfiledlg iupweb iuptuio
-do_all: iup iupcd iupcontrols iupgl iupglcontrols iup_plot iup_mglplot iup_scintilla iupim iupimglib $(WINLIBS) iupweb iuptuio ledc iupview iupvled iuplua5 iupluaconsole iupluascripter
+Targets := iup iupcd iupcontrols iupgl iupglcontrols iup_plot iup_mglplot iup_scintilla iupim iupimglib $(WINLIBS) iupweb iuptuio ledc iupview iupvled iuplua5 iupluaconsole iupluascripter
+Targets := $(filter-out $(EXCLUDE_TARGETS), $(Targets))
+OtherDependencies := iupgtk iupmot iupfiledlg
 
+.PHONY: do_all $(Targets) $(OtherDependencies)
+do_all: $(Targets)
+
 iup iupgtk iupmot:
 	@$(MAKE) --no-print-directory -C ./src/ $@
 iupcd:
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to