Make idlval build, rather than be dead code
authorDan Scott <dscott@laurentian.ca>
Sun, 23 Oct 2011 23:58:53 +0000 (16:58 -0700)
committerMike Rylander <mrylander@gmail.com>
Tue, 15 Nov 2011 16:58:49 +0000 (11:58 -0500)
The tool "idlval" contained in Open-ILS/src/c-apps can be used to check
the correctness of fieldmapper definitions in files like
Open-ILS/examples/fm_IDL.xml - but currently does not have a build
target, nor does it compile cleanly due to the use of unspecified
OpenSRF header files. This commit adds a build target, fixes the compile
problems, and installs the tool in the bin directory.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/c-apps/Makefile.am
Open-ILS/src/c-apps/idlval.c

index 813ea38..003b5ef 100644 (file)
@@ -7,7 +7,7 @@
 AM_CFLAGS = $(DEF_CFLAGS) -DOSRF_LOG_PARAMS -I@top_srcdir@/include/
 AM_LDFLAGS = $(DEF_LDFLAGS) -L$(DBI_LIBS) -lopensrf
 
-bin_PROGRAMS = oils_dataloader dump_idl test_json_query test_qstore
+bin_PROGRAMS = oils_dataloader dump_idl idlval test_json_query test_qstore
 oils_dataloader_SOURCES = oils_dataloader.c
 oils_dataloader_LDFLAGS = $(AM_LDFLAGS) -loils_idl
 oils_dataloader_DEPENDENCIES = liboils_idl.la liboils_utils.la
@@ -16,6 +16,11 @@ dump_idl_SOURCES = dump_idl.c
 dump_idl_LDFLAGS = $(AM_LDFLAGS) -loils_idl
 dump_idl_DEPENDENCIES = liboils_idl.la liboils_utils.la
 
+idlval_SOURCES = idlval.c oils_sql.c
+idlval_CFLAGS = $(AM_CFLAGS)
+idlval_LDFLAGS = $(AM_LDFLAGS) -loils_idl -loils_utils
+idlval_DEPENDENCIES = liboils_idl.la liboils_utils.la
+
 test_json_query_SOURCES = test_json_query.c oils_sql.c
 test_json_query_CFLAGS = $(AM_CFLAGS)
 test_json_query_LDFLAGS = $(AM_LDFLAGS) -loils_idl -loils_utils
index 38ce79e..eeceaa2 100644 (file)
@@ -29,8 +29,8 @@ GNU General Public License for more details.
 #include <libxml/debugXML.h>
 #include <libxml/xmlmemory.h>
 
-#include "utils.h"
-#include "osrf_hash.h"
+#include <opensrf/utils.h>
+#include <opensrf/osrf_hash.h>
 
 /* Represents the command line */
 struct Opts {