blob: ec485a0b02ce7937699546d5bd19d6c93231b351 [file] [log] [blame]
diff -aruN sysfsutils-2.1.0/configure.ac sysfsutils-2.1.0.N/configure.ac
--- sysfsutils-2.1.0/configure.ac 2006-08-06 22:08:00.000000000 -0700
+++ sysfsutils-2.1.0.N/configure.ac 2008-12-09 12:59:02.000000000 -0800
@@ -1,8 +1,10 @@
# Process this file with autoconf to produce a configure script.
-AC_INIT(sysfsutils, 2.1.0, linux-diag-devel@lists.sourceforge.net)
+AC_PREREQ(2.59)
+AC_INIT([sysfsutils],[2.1.0],[linux-diag-devel@lists.sourceforge.net],[sysfsutils])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([config.h.in])
-AM_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
# Checks for KLIBC support (should be before AC_PROG_LIBTOOL and AC_PROG_CC)
AC_CHECK_KLIBC
@@ -50,5 +52,6 @@
AC_CONFIG_FILES([Makefile
lib/Makefile
cmd/Makefile
- test/Makefile])
+ test/Makefile
+ test/create-test.sh])
AC_OUTPUT
diff -aruN sysfsutils-2.1.0/lib/Makefile.am sysfsutils-2.1.0.N/lib/Makefile.am
--- sysfsutils-2.1.0/lib/Makefile.am 2006-08-06 22:08:01.000000000 -0700
+++ sysfsutils-2.1.0.N/lib/Makefile.am 2008-12-09 12:55:43.000000000 -0800
@@ -1,7 +1,7 @@
lib_LTLIBRARIES = libsysfs.la
libsysfs_la_SOURCES = sysfs_utils.c sysfs_attr.c sysfs_class.c dlist.c \
sysfs_device.c sysfs_driver.c sysfs_bus.c sysfs_module.c sysfs.h
-INCLUDES = -I../include
+INCLUDES = -I$(top_srcdir)/include
libsysfs_la_LDFLAGS = -version-info 2:1:0
EXTRA_CFLAGS = @EXTRA_CLFAGS@
libsysfs_la_CFLAGS = -Wall -W -Wstrict-prototypes $(EXTRA_CLFAGS)
diff -aruN sysfsutils-2.1.0/cmd/Makefile.am sysfsutils-2.1.0.N/cmd/Makefile.am
--- sysfsutils-2.1.0/cmd/Makefile.am 2005-11-25 06:06:05.000000000 -0800
+++ sysfsutils-2.1.0.N/cmd/Makefile.am 2008-12-09 12:55:43.000000000 -0800
@@ -1,6 +1,6 @@
bin_PROGRAMS = systool
systool_SOURCES = systool.c names.c names.h
-INCLUDES = -I../include
+INCLUDES = -I$(top_srcdir)/include
LDADD = ../lib/libsysfs.la
EXTRA_CFLAGS = @EXTRA_CFLAGS@
AM_CFLAGS = -Wall -W -Wstrict-prototypes $(EXTRA_CFLAGS)
diff -aruN sysfsutils-2.1.0/test/create-test sysfsutils-2.1.0.N/test/create-test
--- sysfsutils-2.1.0/test/create-test 2005-11-28 02:22:10.000000000 -0800
+++ sysfsutils-2.1.0.N/test/create-test 1969-12-31 16:00:00.000000000 -0800
@@ -1,42 +0,0 @@
-#! /bin/sh
-
-rm -f test.h
-
-conf_file=./libsysfs.conf
-
-. $conf_file
-
-echo "#define val_dir_path \"$VALID_DIRECTORY_PATH\"" > test.h
-echo "#define val_link_path \"$VALID_LINK_PATH\"" >> test.h
-echo "#define val_file_path \"$VALID_FILE_PATH\"" >> test.h
-echo "#define val_subdir_link_name \"$VALID_SUBDIR_LINK_NAME\"" >> test.h
-echo "#define val_subdir_name \"$VALID_SUBDIR_NAME\"" >> test.h
-echo "#define val_subsys \"$VALID_SUBSYSTEM\"" >> test.h
-echo "#define val_bus_name \"$VALID_BUS_NAME\"" >> test.h
-echo "#define val_bus_attr \"$VALID_BUS_ATTR\"" >> test.h
-echo "#define val_root_name \"$VALID_ROOT_NAME\"" >> test.h
-echo "#define val_root_dev_path \"$VALID_ROOT_PATH\"" >> test.h
-echo "#define val_bus_id \"$VALID_BUS_ID\"" >> test.h
-echo "#define val_dev_path \"$VALID_DEVICE_PATH\"" >> test.h
-echo "#define val_dev_attr \"$VALID_DEVICE_ATTR\"" >> test.h
-echo "#define val_class \"$VALID_CLASS\"" >> test.h
-echo "#define val_class_dev \"$VALID_CLASS_DEVICE\"" >> test.h
-echo "#define val_class_dev_path \"$VALID_CLASS_DEVICE_PATH\"" >> test.h
-echo "#define val_class_dev_attr \"$VALID_CLASS_DEV_ATTR\"" >> test.h
-echo "#define val_block_class_dev_path \"$VALID_BLOCK_DEV_PATH\"" >> test.h
-echo "#define val_drv_name \"$VALID_DRIVER\"" >> test.h
-echo "#define val_drv_path \"$VALID_DRIVER_PATH\"" >> test.h
-echo "#define val_drv_bus_name \"$VALID_DRIVER_BUS\"" >> test.h
-echo "#define val_drv_dev_name \"$VALID_DRIVER_DEVICE\"" >> test.h
-echo "#define val_drv_attr_name \"$VALID_DRIVER_ATTR\"" >> test.h
-echo "#define val_drv1_name \"$VALID_DRIVER1\"" >> test.h
-echo "#define val_drv1_path \"$VALID_DRIVER1_PATH\"" >> test.h
-echo "#define val_drv1_bus_name \"$VALID_DRIVER1_BUS\"" >> test.h
-echo "#define val_write_attr_path \"$VALID_WRITE_ATTR_PATH\"" >> test.h
-echo "#define val_mod_path \"$VALID_MODULE_PATH\"" >> test.h
-echo "#define val_mod_name \"$VALID_MODULE\"" >> test.h
-echo "#define val_mod_attr_name \"$VALID_MODULE_ATTRIBUTE\"" >> test.h
-echo "#define val_mod_param \"$VALID_MODULE_PARAM\"" >> test.h
-echo "#define val_mod_section \"$VALID_MODULE_SECTION\"" >> test.h
-
-
diff -aruN sysfsutils-2.1.0/test/create-test.sh.in sysfsutils-2.1.0.N/test/create-test.sh.in
--- sysfsutils-2.1.0/test/create-test.sh.in 1969-12-31 16:00:00.000000000 -0800
+++ sysfsutils-2.1.0.N/test/create-test.sh.in 2008-12-09 12:55:43.000000000 -0800
@@ -0,0 +1,42 @@
+#! /bin/sh
+
+rm -f test.h
+
+conf_file=@srcdir@/libsysfs.conf
+
+. $conf_file
+
+echo "#define val_dir_path \"$VALID_DIRECTORY_PATH\"" > test.h
+echo "#define val_link_path \"$VALID_LINK_PATH\"" >> test.h
+echo "#define val_file_path \"$VALID_FILE_PATH\"" >> test.h
+echo "#define val_subdir_link_name \"$VALID_SUBDIR_LINK_NAME\"" >> test.h
+echo "#define val_subdir_name \"$VALID_SUBDIR_NAME\"" >> test.h
+echo "#define val_subsys \"$VALID_SUBSYSTEM\"" >> test.h
+echo "#define val_bus_name \"$VALID_BUS_NAME\"" >> test.h
+echo "#define val_bus_attr \"$VALID_BUS_ATTR\"" >> test.h
+echo "#define val_root_name \"$VALID_ROOT_NAME\"" >> test.h
+echo "#define val_root_dev_path \"$VALID_ROOT_PATH\"" >> test.h
+echo "#define val_bus_id \"$VALID_BUS_ID\"" >> test.h
+echo "#define val_dev_path \"$VALID_DEVICE_PATH\"" >> test.h
+echo "#define val_dev_attr \"$VALID_DEVICE_ATTR\"" >> test.h
+echo "#define val_class \"$VALID_CLASS\"" >> test.h
+echo "#define val_class_dev \"$VALID_CLASS_DEVICE\"" >> test.h
+echo "#define val_class_dev_path \"$VALID_CLASS_DEVICE_PATH\"" >> test.h
+echo "#define val_class_dev_attr \"$VALID_CLASS_DEV_ATTR\"" >> test.h
+echo "#define val_block_class_dev_path \"$VALID_BLOCK_DEV_PATH\"" >> test.h
+echo "#define val_drv_name \"$VALID_DRIVER\"" >> test.h
+echo "#define val_drv_path \"$VALID_DRIVER_PATH\"" >> test.h
+echo "#define val_drv_bus_name \"$VALID_DRIVER_BUS\"" >> test.h
+echo "#define val_drv_dev_name \"$VALID_DRIVER_DEVICE\"" >> test.h
+echo "#define val_drv_attr_name \"$VALID_DRIVER_ATTR\"" >> test.h
+echo "#define val_drv1_name \"$VALID_DRIVER1\"" >> test.h
+echo "#define val_drv1_path \"$VALID_DRIVER1_PATH\"" >> test.h
+echo "#define val_drv1_bus_name \"$VALID_DRIVER1_BUS\"" >> test.h
+echo "#define val_write_attr_path \"$VALID_WRITE_ATTR_PATH\"" >> test.h
+echo "#define val_mod_path \"$VALID_MODULE_PATH\"" >> test.h
+echo "#define val_mod_name \"$VALID_MODULE\"" >> test.h
+echo "#define val_mod_attr_name \"$VALID_MODULE_ATTRIBUTE\"" >> test.h
+echo "#define val_mod_param \"$VALID_MODULE_PARAM\"" >> test.h
+echo "#define val_mod_section \"$VALID_MODULE_SECTION\"" >> test.h
+
+
diff -aruN sysfsutils-2.1.0/test/Makefile.am sysfsutils-2.1.0.N/test/Makefile.am
--- sysfsutils-2.1.0/test/Makefile.am 2006-08-23 00:37:02.000000000 -0700
+++ sysfsutils-2.1.0.N/test/Makefile.am 2008-12-09 12:55:43.000000000 -0800
@@ -1,15 +1,26 @@
+SUFFIXES = .sh
+
+.sh:
+ rm -f $@ $@-t
+ cp $< $@-t
+ chmod +x $@-t
+ mv $@-t $@
+
bin_PROGRAMS = dlist_test get_device get_driver get_module
-BUILT_SOURCES = test.h
-CLEANFILES = test.h
-test.h:
- ./create-test
+noinst_SCRIPTS = create-test
+BUILT_SOURCES = test.h create-test.sh
+CLEANFILES = test.h $(noinst_SCRIPTS)
+test.h: $(builddir)/create-test
+ $<
+create-test: create-test.sh
+create-test.sh: create-test.sh.in
get_device_SOURCES = get_device.c
get_driver_SOURCES = get_driver.c
get_module_SOURCES = get_module.c
testlibsysfs_SOURCES = test.c test_attr.c test_bus.c test_class.c \
test_device.c test_driver.c test_module.c test_utils.c \
- testout.c test-defs.h libsysfs.conf create-test
-INCLUDES = -I../include
+ testout.c test-defs.h libsysfs.conf
+INCLUDES = -I$(top_srcdir)/include
LDADD = ../lib/libsysfs.la
EXTRA_CFLAGS = @EXTRA_CLFAGS@
AM_CFLAGS = -Wall -W -Wstrict-prototypes $(EXTRA_CLFAGS)