]> mj.ucw.cz Git - pciutils.git/commitdiff
Moved all system-dependent decisions from Makefile to lib/configure.
authorMartin Mares <mj@ucw.cz>
Sat, 9 Sep 2006 11:08:12 +0000 (13:08 +0200)
committerMartin Mares <mj@ucw.cz>
Sat, 9 Sep 2006 11:08:12 +0000 (13:08 +0200)
ChangeLog
Makefile
TODO
lib/configure

index 71107e15b043887735d8113b057ae8402507f9e0..b18fd90bc4c623231b462ece155ea6729c5dd533 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-09-09  Martin Mares  <mj@ucw.cz>
 
+       * Makefile: Moved all system-dependent decisions to lib/configure,
+       since config.mk is included in the top-level Makefile anyway.
+
        * lib/configure: When configuring for Linux, ignore the kernel version
        and always build all access methods.
 
index 5aaf06be15c64f914e1262eb917f298fd0bb8c9a..b187e9badef5bafe6e9daae739ab5e5371900850 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -18,20 +18,6 @@ PCILIB=lib/libpci.a
 PCIINC=lib/config.h lib/header.h lib/pci.h lib/types.h lib/sysdep.h
 
 -include lib/config.mk
-ifdef PCI_COMPRESSED_IDS
-LDFLAGS += -lz
-endif
-
-ifeq ($(shell uname),NetBSD)
-PCILIB=lib/libpciutils.a
-LDFLAGS+=-lpci
-else
-ifeq ($(shell uname),AIX)
-CFLAGS=-g
-INSTALL=installbsd
-DIRINSTALL=mkdir -p
-endif
-endif
 
 HOST=
 RELEASE=
diff --git a/TODO b/TODO
index 6b453073933bcfcccaecd0dfb4d622ef06f06dc1..0768888b2c3f4b41c806cb092f787abfedf65743 100644 (file)
--- a/TODO
+++ b/TODO
@@ -8,6 +8,3 @@
 PCIIDS:
 - another mirror at Atrey?
 - delete old DB at SF
-
-- -Winline
-- release testing is bogus
index 2fc33bb2e379a6611845b2eef75476720a18a869..57c550961882d7a76e060c0ce5b63715d123ff30 100755 (executable)
@@ -35,8 +35,10 @@ echo " $host $rel"
 zlib=$5
 
 c=config.h
+m=config.mk
 echo >$c "#define PCI_ARCH_`echo $cpu | tr 'a-z' 'A-Z'`"
 echo >>$c "#define PCI_OS_`echo $sys | tr 'a-z' 'A-Z'`"
+rm -f $m
 
 echo_n "Looking for access methods..."
 
@@ -79,11 +81,16 @@ case $sys in
        aix)
                echo_n " aix-device"
                echo >>$c '#define PCI_HAVE_PM_AIX_DEVICE'
+               echo >>$m 'CFLAGS=-g'
+               echo >>$m 'INSTALL=installbsd'
+               echo >>$m 'DIRINSTALL=mkdir -p'
                ;;
        netbsd)
                echo_n " nbsd-libpci"
                echo >>$c '#define PCI_HAVE_PM_NBSD_LIBPCI'
                echo >>$c '#define PCI_PATH_NBSD_DEVICE "/dev/pci0"'
+               echo >>$m 'PCILIB=lib/libpciutils.a'
+               echo >>$m 'LDFLAGS+=-lpci'
                ;;
        gnu)
                echo_n " i386-ports"
@@ -111,11 +118,12 @@ else
 fi
 if [ "$zlib" = yes ] ; then
        echo >>$c '#define PCI_COMPRESSED_IDS'
-       echo >>$c "#define PCI_IDS \"pci.ids.gz\""
+       echo >>$c '#define PCI_IDS "pci.ids.gz"'
+       echo >>$m 'LDFLAGS+=-lz'
 else
-       echo >>$c "#define PCI_IDS \"pci.ids\""
+       echo >>$c '#define PCI_IDS "pci.ids"'
 fi
 echo >>$c "#define PCI_PATH_IDS_DIR \"$idsdir\""
 
 echo >>$c "#define PCILIB_VERSION \"$version\""
-sed '/"/{s/^#define \([^ ]*\) "\(.*\)"$/\1=\2/;p;d;};s/^#define \(.*\)/\1=1/' <$c >config.mk
+sed '/"/{s/^#define \([^ ]*\) "\(.*\)"$/\1=\2/;p;d;};s/^#define \(.*\)/\1=1/' <$c >>$m