From: Blair Z. <bl...@or...> - 2003-06-11 16:39:46
|
John Max Skaller wrote: > > Nicolas Cannasse wrote: > > > I agree on this one . Modern software development and Internet are enabling > > a quick bug reporting/fix and then users only have to update their version. > > About this "update" and installation-made-easy of the ExtLib, I was thinking > > writing a small and simple OCaml program that will check and download the > > last extlib version , compile using ocamake (I think perhaps we should then > > put ocamake in the ExtLib) and install it in 'ocamlc -where'/extlib . > > I tried to do that once and users hated it :-) > They wanted a plain old tarball. Still, software like Internet > Explorer and Redhat Linux use this idea, but I suspect > it would be more useful if it could update multiple packages, > not just Extlib. I agree a tarball release should be available. > > I would like to have some comments from Unix users to know how we can make the > > user being able to choose the install directory and still have a nice and > > portable way of retreiving the install dir (needed by Makefile of program > > using ExtLib at linking time). > > You can make an executable which is put in, say > > /usr/local/bin > > or > > ~/bin > > extlib > > which prints the install dir so people can write: > > ocamlc -I`extlib` > > and add some options: > > extlib --help --version --test > > it would also be tricky to have > > man extlib > > tell where the installation went. Instead of reinventing the wheel here, how about using pkg-config. It handles this kind of stuff and used by a large number of packages: % ls /usr/lib/pkgconfig/ fontconfig.pc gnome-python-2.0.pc* libxml-2.0.pc gconfgtk.pc gobject-2.0.pc libxml.pc gconf.pc gthread-2.0.pc libxslt.pc gdk.pc gthread.pc openssl.pc* glib-2.0.pc gtk+.pc ORBit.pc glib.pc libIDL.pc xcursor.pc gmodule-2.0.pc libmetacity-private.pc xft.pc gmodule.pc libnautilus.pc gnome-mime-data-2.0.pc libpng12.pc You can query arbitrary settings for your package: % pkg-config --help Usage: pkg-config [OPTION...] --version output version of pkg-config --modversion output version for package --atleast-pkgconfig-version=VERSION require given version of pkg-config --libs output all linker flags --libs-only-l output -l flags --libs-only-L output -L flags --cflags output all pre-processor and compiler flags --cflags-only-I output -I flags --variable=VARIABLENAME get the value of a variable --define-variable=VARIABLENAME=VARIABLEVALUE set the value of a variable --exists return 0 if the module(s) exist --uninstalled return 0 if the uninstalled version of one or more module(s) or their dependencies will be used --atleast-version=VERSION return 0 if the module is at least version VERSION --exact-version=VERSION return 0 if the module is at exactly version VERSION --max-version=VERSION return 0 if the module is at no newer than version VERSION --list-all list all known packages --debug show verbose debug information --print-errors show verbose information about missing or conflicting packages --silence-errors show verbose information about missing or conflicting packages --errors-to-stdout print errors from --print-errors to stdout not stderr Help options -?, --help Show this help message --usage Display brief usage message Best, Blair -- Blair Zajac <bl...@or...> Plots of your system's performance - http://www.orcaware.com/orca/ |