libiscsi-0001-Fix-warnings-related-to-subdir-objects.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From e801ccb2633e3f5842ed6d160af0e6e5cce44c77 Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Tue, 2 Sep 2014 22:38:55 +0200
  4. Subject: [PATCH 1/4] Fix warnings related to subdir-objects
  5. Use AM_INIT_AUTOMAKE in configure.ac to define options such as
  6. subdir-objects, instead of AUTOMAKE_OPTIONS in Makefile.am, as it
  7. allows to avoid warnings during autoreconf:
  8. examples/Makefile.am:25: warning: source file '../lib/connect.c' is in a subdirectory,
  9. examples/Makefile.am:25: but option 'subdir-objects' is disabled
  10. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  11. ---
  12. Makefile.am | 1 -
  13. configure.ac | 2 +-
  14. 2 files changed, 1 insertion(+), 2 deletions(-)
  15. diff --git a/Makefile.am b/Makefile.am
  16. index 7023988..f9de08c 100644
  17. --- a/Makefile.am
  18. +++ b/Makefile.am
  19. @@ -2,7 +2,6 @@
  20. SUBDIRS = lib doc utils test-tool examples
  21. ACLOCAL_AMFLAGS =-I m4
  22. -AUTOMAKE_OPTIONS = foreign subdir-objects
  23. AM_CPPFLAGS=-I. -I$(srcdir)/include "-D_U_=__attribute__((unused))" \
  24. "-D_R_(A,B)=__attribute__((format(printf,A,B)))"
  25. AM_CFLAGS=$(WARN_CFLAGS)
  26. diff --git a/configure.ac b/configure.ac
  27. index e1d01c6..6d29af0 100644
  28. --- a/configure.ac
  29. +++ b/configure.ac
  30. @@ -3,7 +3,7 @@ AC_INIT(libiscsi, m4_esyscmd([grep 'Version:' ./packaging/RPM/libiscsi.spec.in 2
  31. AC_CONFIG_SRCDIR([lib/init.c])
  32. AC_CONFIG_MACRO_DIR([m4])
  33. -AM_INIT_AUTOMAKE
  34. +AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
  35. AM_SILENT_RULES
  36. LT_INIT
  37. --
  38. 2.0.0