## This file is part of the YAZ toolkit.
## Copyright (C) 1995-2007, Index Data, All rights reserved.
-## $Id: Makefile.am,v 1.62 2007-04-18 07:34:35 adam Exp $
+## $Id: Makefile.am,v 1.63 2007-04-18 08:08:02 adam Exp $
YAZ_VERSION_INFO=3:0:0
# Generate OID database from CSV
oid_std.c $(top_srcdir)/include/yaz/oid_std.h: oidtoc.tcl oid.csv
- $(TCLSH) $(srcdir)/oidtoc.tcl $(srcdir)/oid.csv $(srcdir)/oid_std.c $(top_srcdir)/include/yaz/oid_std.h
+ $(TCLSH) $(srcdir)/oidtoc.tcl $(srcdir) oid.csv oid_std.c oid_std.h
# Generate diagnostics from CSVs
diagbib1.c $(top_srcdir)/include/yaz/diagbib1.h: csvtobib1.tcl bib1.csv
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: oid_db.c,v 1.5 2007-04-16 21:53:09 adam Exp $
+ * $Id: oid_db.c,v 1.6 2007-04-18 08:08:02 adam Exp $
*/
/**
+ * \file oid_db.c
* \brief OID Database
*/
#if HAVE_CONFIG_H
# Copyright (c) Index Data 2006-2007
# See the file LICENSE for details.
#
-# $Id: oidtoc.tcl,v 1.1 2007-04-16 21:53:09 adam Exp $
+# $Id: oidtoc.tcl,v 1.2 2007-04-18 08:08:02 adam Exp $
#
# Converts a CSV file with Object identifiers to C
return $oids
}
-proc oid_to_c {input cfile hfile} {
- set oids [readoids $input]
+proc oid_to_c {srcdir input cname hname} {
+ set oids [readoids "${srcdir}/${input}"]
+
+ set cfile [open "${srcdir}/${cname}" w]
+ set hfile [open "${srcdir}/../include/yaz/${hname}" w]
+
+ puts $cfile "/** \\file $cname"
+ puts $hfile "/** \\file $hname"
+ set preamble " \\brief Standard Object Identifiers: Generated from $input */"
+ puts $cfile $preamble
+ puts $hfile $preamble
- set cfile [open $cfile w]
- set hfile [open $hfile w]
puts $cfile "\#include <yaz/oid_db.h>"
puts $cfile ""
close $hfile
}
-if {[llength $argv] != 3} {
- puts "oidtoc.tcl csv cfile hfile"
+if {[llength $argv] != 4} {
+ puts "oidtoc.tcl srcdir csv cfile hfile"
exit 1
}
-oid_to_c [lindex $argv 0] [lindex $argv 1] [lindex $argv 2]
\ No newline at end of file
+oid_to_c [lindex $argv 0] [lindex $argv 1] [lindex $argv 2] [lindex $argv 3]