From: Ilya S. <il...@bl...> - 2005-05-12 02:26:31
|
Good morning/evening, Not sure whether this deserves to be in documentation/be part of the source/or is just a useless curiousity.... Anyway, when I tried to build mdbtools on RH7.3, it turned out that I need a newer autoconf, after trying and failing to update autoconf, I tried to build mdbtools without it and it turned out to be a matter of a 10-line script...The script is below, maybe it would be useful for someone/somewhere... #!/usr/bin/python import os,sys def run(cmd): print cmd status=os.system(cmd) assert status ==0, "command failed" run("echo '#define MDB_FULL_VERSION \"CVS051105\"' >include/mdbver.h") run("touch include/config.g") GLIB_INCL="-I../../include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include" if not os.path.exists("bin"): os.mkdir("bin") os.chdir("src/libmdb") run("gcc -c %(GLIB_INCL)s *.c" % vars()) #run("ar r libmdb.a *.o") os.chdir("../../") os.chdir("src/util") for tool in ("mdb-ver", "mdb-tables", "mdb-export", "mdb-schema", "mdb-check", "prtable", "prdump", "prdata"): run("gcc %(GLIB_INCL)s -ldl -lm ../libmdb/*.o -lglib-2.0 %(tool)s.c -o../../bin/%(tool)s" %vars()) Does this brute force build method deserve to be mentioned in installation guide? Ilya |