From: Kay Sievers Date: Sat, 20 Sep 2008 06:03:49 +0000 (-0700) Subject: always include config.h from Makefile X-Git-Tag: 174~1537 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38f27948cdafd8a4b90a6b4f1f54b89891983506;p=systemd always include config.h from Makefile --- diff --git a/Makefile.am.inc b/Makefile.am.inc new file mode 100644 index 00000000..f61706a2 --- /dev/null +++ b/Makefile.am.inc @@ -0,0 +1,9 @@ +AM_CPPFLAGS = \ + -include $(top_builddir)/config.h \ + -DSYSCONFDIR=\""$(sysconfdir)"\" \ + -DUDEV_PREFIX=\""$(udev_prefix)"\" \ + -D_LIBUDEV_COMPILATION + +AM_CFLAGS = + +AM_LDFLAGS = diff --git a/extras/ata_id/Makefile.am b/extras/ata_id/Makefile.am index ce4a3233..89aa02f5 100644 --- a/extras/ata_id/Makefile.am +++ b/extras/ata_id/Makefile.am @@ -1,13 +1,9 @@ +include $(top_srcdir)/Makefile.am.inc + udevhomedir = $(udev_prefix)/lib/udev udevhome_PROGRAMS = \ ata_id -AM_CPPFLAGS = \ - -DSYSCONFDIR=\""$(sysconfdir)"\" \ - -DUDEV_PREFIX=\""$(udev_prefix)"\" \ - -D_LIBUDEV_COMPILATION \ - -UUSE_SELINUX - ata_id_SOURCES = \ ata_id.c \ ../../udev/lib/libudev.h \ diff --git a/extras/cdrom_id/Makefile.am b/extras/cdrom_id/Makefile.am index d4db32b7..ec14366a 100644 --- a/extras/cdrom_id/Makefile.am +++ b/extras/cdrom_id/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.am.inc + udevhomedir = $(udev_prefix)/lib/udev udevhome_PROGRAMS = \ cdrom_id @@ -6,11 +8,6 @@ udevrulesdir = $(udev_prefix)/lib/udev/rules.d dist_udevrules_DATA = \ 60-cdrom_id.rules -AM_CPPFLAGS = \ - -DSYSCONFDIR=\""$(sysconfdir)"\" \ - -DUDEV_PREFIX=\""$(udev_prefix)"\" \ - -D_LIBUDEV_COMPILATION - cdrom_id_SOURCES = \ cdrom_id.c \ ../../udev/lib/libudev.h \ diff --git a/extras/collect/Makefile.am b/extras/collect/Makefile.am index a92f4aa9..60315dd8 100644 --- a/extras/collect/Makefile.am +++ b/extras/collect/Makefile.am @@ -1,11 +1,9 @@ +include $(top_srcdir)/Makefile.am.inc + udevhomedir = $(udev_prefix)/lib/udev udevhome_PROGRAMS = \ collect -AM_CPPFLAGS = \ - -DSYSCONFDIR=\""$(sysconfdir)"\" \ - -DUDEV_PREFIX=\""$(udev_prefix)"\" - distclean-local: rm -f Makefile.in diff --git a/extras/edd_id/Makefile.am b/extras/edd_id/Makefile.am index 3bdbbd85..652d2c47 100644 --- a/extras/edd_id/Makefile.am +++ b/extras/edd_id/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.am.inc + udevhomedir = $(udev_prefix)/lib/udev udevhome_PROGRAMS = \ edd_id @@ -6,11 +8,6 @@ udevrulesdir = $(udev_prefix)/lib/udev/rules.d dist_udevrules_DATA = \ 61-persistent-storage-edd.rules -AM_CPPFLAGS = \ - -DSYSCONFDIR=\""$(sysconfdir)"\" \ - -DUDEV_PREFIX=\""$(udev_prefix)"\" \ - -D_LIBUDEV_COMPILATION - edd_id_SOURCES = \ edd_id.c \ ../../udev/lib/libudev.h \ diff --git a/extras/floppy/Makefile.am b/extras/floppy/Makefile.am index 59fc4e56..a62dd209 100644 --- a/extras/floppy/Makefile.am +++ b/extras/floppy/Makefile.am @@ -1,12 +1,9 @@ +include $(top_srcdir)/Makefile.am.inc + udevhomedir = $(udev_prefix)/lib/udev udevhome_PROGRAMS = \ create_floppy_devices -AM_CPPFLAGS = \ - -DSYSCONFDIR=\""$(sysconfdir)"\" \ - -DUDEV_PREFIX=\""$(udev_prefix)"\" \ - -D_LIBUDEV_COMPILATION - create_floppy_devices_SOURCES = \ create_floppy_devices.c \ ../../udev/lib/libudev.h \ diff --git a/extras/fstab_import/Makefile.am b/extras/fstab_import/Makefile.am index 2ed383d9..49e598e1 100644 --- a/extras/fstab_import/Makefile.am +++ b/extras/fstab_import/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.am.inc + udevhomedir = $(udev_prefix)/lib/udev udevhome_PROGRAMS = \ fstab_import @@ -6,11 +8,6 @@ udevrulesdir = $(udev_prefix)/lib/udev/rules.d dist_udevrules_DATA = \ 79-fstab_import.rules -AM_CPPFLAGS = \ - -DSYSCONFDIR=\""$(sysconfdir)"\" \ - -DUDEV_PREFIX=\""$(udev_prefix)"\" \ - -D_LIBUDEV_COMPILATION - fstab_import_SOURCES = \ fstab_import.c \ ../../udev/lib/libudev.h \ diff --git a/extras/fstab_import/fstab_import.c b/extras/fstab_import/fstab_import.c index 245a72ff..71ab5d34 100644 --- a/extras/fstab_import/fstab_import.c +++ b/extras/fstab_import/fstab_import.c @@ -13,8 +13,6 @@ #define _GNU_SOURCE 1 #endif -#include "config.h" - #include #include #include diff --git a/extras/scsi_id/Makefile.am b/extras/scsi_id/Makefile.am index b6bebb69..0b5dbf04 100644 --- a/extras/scsi_id/Makefile.am +++ b/extras/scsi_id/Makefile.am @@ -1,12 +1,9 @@ +include $(top_srcdir)/Makefile.am.inc + udevhomedir = $(udev_prefix)/lib/udev udevhome_PROGRAMS = \ scsi_id -AM_CPPFLAGS = \ - -DSYSCONFDIR=\""$(sysconfdir)"\" \ - -DUDEV_PREFIX=\""$(udev_prefix)"\" \ - -D_LIBUDEV_COMPILATION - scsi_id_SOURCES = \ scsi_id.c \ scsi_serial.c \ diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c index d692a867..bf06ed27 100644 --- a/extras/scsi_id/scsi_id.c +++ b/extras/scsi_id/scsi_id.c @@ -14,8 +14,6 @@ * Free Software Foundation version 2 of the License. */ -#include "config.h" - #include #include #include diff --git a/extras/usb_id/Makefile.am b/extras/usb_id/Makefile.am index c8d743b5..89d59657 100644 --- a/extras/usb_id/Makefile.am +++ b/extras/usb_id/Makefile.am @@ -1,12 +1,9 @@ +include $(top_srcdir)/Makefile.am.inc + udevhomedir = $(udev_prefix)/lib/udev udevhome_PROGRAMS = \ usb_id -AM_CPPFLAGS = \ - -DSYSCONFDIR=\""$(sysconfdir)"\" \ - -DUDEV_PREFIX=\""$(udev_prefix)"\" \ - -D_LIBUDEV_COMPILATION - usb_id_SOURCES = \ usb_id.c \ ../../udev/lib/libudev.h \ diff --git a/extras/usb_id/usb_id.c b/extras/usb_id/usb_id.c index 9938dc00..f482147b 100644 --- a/extras/usb_id/usb_id.c +++ b/extras/usb_id/usb_id.c @@ -11,8 +11,6 @@ * Free Software Foundation version 2 of the License. */ -#include - #include #include #include diff --git a/extras/volume_id/Makefile.am b/extras/volume_id/Makefile.am index 3e11d5c3..4d904d83 100644 --- a/extras/volume_id/Makefile.am +++ b/extras/volume_id/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.am.inc + SUBDIRS = \ lib @@ -5,11 +7,6 @@ udevhomedir = $(udev_prefix)/lib/udev udevhome_PROGRAMS = \ vol_id -AM_CPPFLAGS = \ - -DSYSCONFDIR=\""$(sysconfdir)"\" \ - -DUDEV_PREFIX=\""$(udev_prefix)"\" \ - -D_LIBUDEV_COMPILATION - vol_id_SOURCES = \ vol_id.c \ ../../udev/lib/libudev.h \ diff --git a/udev/Makefile.am b/udev/Makefile.am index 5d47baa0..323f508b 100644 --- a/udev/Makefile.am +++ b/udev/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.am.inc + SUBDIRS = \ lib @@ -8,11 +10,6 @@ sbin_PROGRAMS = \ noinst_PROGRAMS = \ test-udev -AM_CPPFLAGS = \ - -DSYSCONFDIR=\""$(sysconfdir)"\" \ - -DUDEV_PREFIX=\""$(udev_prefix)"\" \ - -D_LIBUDEV_COMPILATION - common_ldadd = common_files = \ diff --git a/udev/lib/Makefile.am b/udev/lib/Makefile.am index 4cbae2e4..7329ab6c 100644 --- a/udev/lib/Makefile.am +++ b/udev/lib/Makefile.am @@ -1,7 +1,4 @@ -AM_CPPFLAGS = \ - -DSYSCONFDIR=\""$(sysconfdir)"\" \ - -DUDEV_PREFIX=\""$(udev_prefix)"\" \ - -D_LIBUDEV_COMPILATION +include $(top_srcdir)/Makefile.am.inc noinst_PROGRAMS = \ test-libudev diff --git a/udev/lib/libudev-ctrl.c b/udev/lib/libudev-ctrl.c index f7cec371..7d37074f 100644 --- a/udev/lib/libudev-ctrl.c +++ b/udev/lib/libudev-ctrl.c @@ -17,8 +17,6 @@ * along with this program. If not, see . */ -#include "config.h" - #include #include #include diff --git a/udev/lib/libudev-device.c b/udev/lib/libudev-device.c index 76ef298a..cc44c78a 100644 --- a/udev/lib/libudev-device.c +++ b/udev/lib/libudev-device.c @@ -17,8 +17,6 @@ * along with this program. If not, see . */ -#include "config.h" - #include #include #include diff --git a/udev/lib/libudev-enumerate.c b/udev/lib/libudev-enumerate.c index b8e4807c..ca5e30e4 100644 --- a/udev/lib/libudev-enumerate.c +++ b/udev/lib/libudev-enumerate.c @@ -17,8 +17,6 @@ * along with this program. If not, see . */ -#include "config.h" - #include #include #include diff --git a/udev/lib/libudev-monitor.c b/udev/lib/libudev-monitor.c index f61ddb0b..0dc8e10c 100644 --- a/udev/lib/libudev-monitor.c +++ b/udev/lib/libudev-monitor.c @@ -17,8 +17,6 @@ * along with this program. If not, see . */ -#include "config.h" - #include #include #include diff --git a/udev/lib/libudev-private.h b/udev/lib/libudev-private.h index 1756be5f..c8063d2d 100644 --- a/udev/lib/libudev-private.h +++ b/udev/lib/libudev-private.h @@ -20,8 +20,6 @@ #ifndef _LIBUDEV_PRIVATE_H_ #define _LIBUDEV_PRIVATE_H_ -#include "config.h" - #include #include "libudev.h" #include "list.h" diff --git a/udev/lib/libudev-util.c b/udev/lib/libudev-util.c index 6ec835e6..7eadc7f2 100644 --- a/udev/lib/libudev-util.c +++ b/udev/lib/libudev-util.c @@ -17,8 +17,6 @@ * along with this program. If not, see . */ -#include "config.h" - #include #include #include diff --git a/udev/lib/libudev.c b/udev/lib/libudev.c index 04ad26c6..2d349259 100644 --- a/udev/lib/libudev.c +++ b/udev/lib/libudev.c @@ -17,8 +17,6 @@ * along with this program. If not, see . */ -#include "config.h" - #include #include #include diff --git a/udev/lib/test-libudev.c b/udev/lib/test-libudev.c index 50123f6e..39330a74 100644 --- a/udev/lib/test-libudev.c +++ b/udev/lib/test-libudev.c @@ -17,8 +17,6 @@ * along with this program. If not, see . */ -#include "config.h" - #include #include #include diff --git a/udev/test-udev.c b/udev/test-udev.c index dae7aaa6..4aa7999f 100644 --- a/udev/test-udev.c +++ b/udev/test-udev.c @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -#include "config.h" - #include #include #include diff --git a/udev/udev.h b/udev/udev.h index 55814cee..b8ae5f00 100644 --- a/udev/udev.h +++ b/udev/udev.h @@ -19,8 +19,6 @@ #ifndef _UDEV_H_ #define _UDEV_H_ -#include "config.h" - #include #include diff --git a/udev/udev_rules_parse.c b/udev/udev_rules_parse.c index a46eff98..541d651f 100644 --- a/udev/udev_rules_parse.c +++ b/udev/udev_rules_parse.c @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -#include "config.h" - #include #include #include diff --git a/udev/udevadm-control.c b/udev/udevadm-control.c index e3a91fc9..baffd0d2 100644 --- a/udev/udevadm-control.c +++ b/udev/udevadm-control.c @@ -12,8 +12,6 @@ * GNU General Public License for more details. */ -#include "config.h" - #include #include #include diff --git a/udev/udevadm-info.c b/udev/udevadm-info.c index abb424bf..3cd889fe 100644 --- a/udev/udevadm-info.c +++ b/udev/udevadm-info.c @@ -15,8 +15,6 @@ * along with this program. If not, see . */ -#include "config.h" - #include #include #include diff --git a/udev/udevadm.c b/udev/udevadm.c index 6de50f42..b1811427 100644 --- a/udev/udevadm.c +++ b/udev/udevadm.c @@ -15,8 +15,6 @@ * along with this program. If not, see . */ -#include "config.h" - #include #include #include diff --git a/udev/udevd.c b/udev/udevd.c index d64beef3..e1ae7eac 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -#include "config.h" - #include #include #include