summaryrefslogtreecommitdiff
path: root/extras/scsi_id
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-07-30 01:45:23 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-07-30 01:45:23 +0200
commit01618658fd82dbc5e6315b639f00e87c6fee3c54 (patch)
treedf8e628d04a81186d6d431fd3b1fa50a3d34987a /extras/scsi_id
parent726687ad48bdececed1e7e44387c50e009e28208 (diff)
use autotools
Diffstat (limited to 'extras/scsi_id')
-rw-r--r--extras/scsi_id/Makefile.am27
-rw-r--r--extras/scsi_id/scsi_id.c9
-rw-r--r--extras/scsi_id/scsi_serial.c3
3 files changed, 33 insertions, 6 deletions
diff --git a/extras/scsi_id/Makefile.am b/extras/scsi_id/Makefile.am
new file mode 100644
index 0000000000..7f890b04cf
--- /dev/null
+++ b/extras/scsi_id/Makefile.am
@@ -0,0 +1,27 @@
+udevhomedir = $(udev_prefix)/lib/udev
+udevhome_PROGRAMS = \
+ scsi_id
+
+AM_CPPFLAGS = \
+ -DSYSCONFDIR=\""$(sysconfdir)"\" \
+ -DUDEV_PREFIX=\""$(udev_prefix)"\"
+
+scsi_id_SOURCES = \
+ scsi_id.c \
+ scsi_serial.c \
+ scsi.h \
+ scsi_id.h \
+ bsg.h \
+ ../../udev/udev_sysdeps.c \
+ ../../udev/udev_utils.c \
+ ../../udev/udev_utils_string.c
+
+dist_sysconf_DATA = \
+ scsi_id.config
+
+dist_man_MANS = \
+ scsi_id.8
+
+distclean-local:
+ rm -f Makefile.in
+
diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c
index bc942fac58..23bcb9468e 100644
--- a/extras/scsi_id/scsi_id.c
+++ b/extras/scsi_id/scsi_id.c
@@ -14,6 +14,8 @@
* Free Software Foundation version 2 of the License.
*/
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -27,9 +29,8 @@
#include <getopt.h>
#include <sys/stat.h>
-#include "../../udev.h"
+#include "../../udev/udev.h"
#include "scsi_id.h"
-#include "scsi_id_version.h"
static const struct option options[] = {
{ "device", 1, NULL, 'd' },
@@ -51,7 +52,7 @@ static const char dev_short_options[] = "bgp:";
static int all_good;
static int dev_specified;
-static char config_file[MAX_PATH_LEN] = SCSI_ID_CONFIG_FILE;
+static char config_file[MAX_PATH_LEN] = SYSCONFDIR "/scsi_id.config";
static enum page_code default_page_code;
static int sg_version = 4;
static int use_stderr;
@@ -468,7 +469,7 @@ static int set_options(int argc, char **argv, const char *short_opts,
break;
case 'V':
- printf("%s\n", SCSI_ID_VERSION);
+ printf("%s\n", VERSION);
exit(0);
break;
diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c
index 016075c3ea..104db3d95f 100644
--- a/extras/scsi_id/scsi_serial.c
+++ b/extras/scsi_id/scsi_serial.c
@@ -30,10 +30,9 @@
/* #include <linux/bsg.h> */
#include "bsg.h"
-#include "../../udev.h"
+#include "../../udev/udev.h"
#include "scsi.h"
#include "scsi_id.h"
-#include "scsi_id_version.h"
/*
* A priority based list of id, naa, and binary/ascii for the identifier