Skip to contentSkip to conversation

automake: wrap an insanely long line

PATCH In review Emil Velikov 1 participant 6 messages Feb 25, 2015 – Mar 8, 2015 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 automake: wrap an insanely long line

---
 Makefile.am | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
Makefile.am +12 -1
index 3cb516c..e9a041d 100644
@@ -57,7 +57,18 @@ if HAVE_TEGRA
 TEGRA_SUBDIR = tegra
 endif
 
-SUBDIRS = . $(LIBKMS_SUBDIR) $(INTEL_SUBDIR) $(NOUVEAU_SUBDIR) $(RADEON_SUBDIR) $(OMAP_SUBDIR) $(EXYNOS_SUBDIR) $(FREEDRENO_SUBDIR) $(TEGRA_SUBDIR) tests man
+SUBDIRS = \
+	. \
+	$(LIBKMS_SUBDIR) \
+	$(INTEL_SUBDIR) \
+	$(NOUVEAU_SUBDIR) \
+	$(RADEON_SUBDIR) \
+	$(OMAP_SUBDIR) \
+	$(EXYNOS_SUBDIR) \
+	$(FREEDRENO_SUBDIR) \
+	$(TEGRA_SUBDIR) \
+	tests \
+	man
 
 libdrm_la_LTLIBRARIES = libdrm.la
 libdrm_ladir = $(libdir)
Signature · 6 lines
2.1.3

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH 2/5 configure: omap, freedreno and tegra require atomics

They have used them since day one, but the check was never there.

Cc Rob Clark <[email protected]>
Cc Thierry Reding <[email protected]>
---
 configure.ac | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
configure.ac +15 -1
index 8afee83..ac1bf8f 100644
@@ -214,7 +214,12 @@ if test "x$drm_cv_atomic_primitives" = "xlibatomic-ops"; then
 	AC_DEFINE(HAVE_LIB_ATOMIC_OPS, 1, [Enable if you have libatomic-ops-dev installed])
 fi
 
-if test "x$INTEL" != "xno" -o "x$RADEON" != "xno" -o "x$NOUVEAU" != "xno"; then
+if test "x$INTEL" != "xno" -o \
+	"x$RADEON" != "xno" -o \
+	"x$NOUVEAU" != "xno" -o \
+	"x$OMAP" != "xno" -o \
+	"x$FREEDRENO" != "xno" -o \
+	"x$TEGRA" != "xno"; then
 	if test "x$drm_cv_atomic_primitives" = "xnone"; then
 		if test "x$INTEL" != "xauto"; then
 			if test "x$INTEL" != "xno"; then
@@ -240,6 +245,15 @@ if test "x$INTEL" != "xno" -o "x$RADEON" != "xno" -o "x$NOUVEAU" != "xno"; then
 			AC_MSG_WARN([Disabling libdrm_nouveau. It depends on atomic operations, which were not found for your compiler/cpu. Try compiling with -march=native, or install the libatomics-op-dev package.])
 			NOUVEAU=no
 		fi
+		if test "x$OMAP" != "xauto"; then
+			AC_MSG_ERROR([libdrm_omap depends upon atomic operations, which were not found for your compiler/cpu. Try compiling with -march=native, or install the libatomics-op-dev package, or, failing both of those, disable support for OMAP GPUs by passing --disable-omap-experimental-api to ./configure])
+		fi
+		if test "x$FREEDRENO" != "xauto"; then
+			AC_MSG_ERROR([libdrm_freedreno depends upon atomic operations, which were not found for your compiler/cpu. Try compiling with -march=native, or install the libatomics-op-dev package, or, failing both of those, disable support for QCOM's Adreno GPUs by passing --disable-freedreno-experimental-api to ./configure])
+		fi
+		if test "x$TEGRA" != "xauto"; then
+			AC_MSG_ERROR([libdrm_tegra depends upon atomic operations, which were not found for your compiler/cpu. Try compiling with -march=native, or install the libatomics-op-dev package, or, failing both of those, disable support for NVIDIA's Tegra GPUs by passing --disable-tegra-experimental-api to ./configure])
+		fi
 	else
 		if test "x$INTEL" != "xno"; then
 			case $host_cpu in
Signature · 6 lines
2.1.3

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

PATCH 3/5 automake: drop the NULL variable from the makefile

In reply to Emil Velikov
---
 tests/Makefile.am | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
tests/Makefile.am +2 -5
index 37b8d3a..e0281aa 100644
@@ -1,5 +1,3 @@
-NULL:=#
-
 AM_CPPFLAGS = \
 	-I $(top_srcdir)/include/drm \
 	-I $(top_srcdir)
@@ -53,10 +51,9 @@ TESTS =						\
 	getstats				\
 	setversion				\
 	updatedraw				\
-	name_from_fd				\
-	$(NULL)
+	name_from_fd
 
-SUBDIRS += vbltest $(NULL)
+SUBDIRS += vbltest
 
 check_PROGRAMS += $(TESTS)
 
Signature · 6 lines
2.1.3

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw

PATCH 4/5 tests: move the SUBDIR at the top of the makefile

In reply to Emil Velikov

None of the subdirs require the modules built in the local makefile, so moving them at the top makes things a hell lot easier to read.

---
 tests/Makefile.am | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)
tests/Makefile.am +14 -12
index e0281aa..90f6405 100644
@@ -1,13 +1,3 @@
-AM_CPPFLAGS = \
-	-I $(top_srcdir)/include/drm \
-	-I $(top_srcdir)
-
-LDADD = $(top_builddir)/libdrm.la
-
-check_PROGRAMS = \
-	dristat \
-	drmstat
-
 SUBDIRS = modeprint proptest
 
 if HAVE_LIBKMS
@@ -27,6 +17,20 @@ SUBDIRS += tegra
 endif
 
 if HAVE_LIBUDEV
+SUBDIRS += vbltest
+endif
+
+AM_CPPFLAGS = \
+	-I $(top_srcdir)/include/drm \
+	-I $(top_srcdir)
+
+LDADD = $(top_builddir)/libdrm.la
+
+check_PROGRAMS = \
+	dristat \
+	drmstat
+
+if HAVE_LIBUDEV
 
 check_LTLIBRARIES = libdrmtest.la
 
@@ -53,8 +57,6 @@ TESTS =						\
 	updatedraw				\
 	name_from_fd
 
-SUBDIRS += vbltest
-
 check_PROGRAMS += $(TESTS)
 
 endif
Signature · 6 lines
2.1.3

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw

PATCH 5/5 tests: automake: keep the libs link at the final stage

In reply to Emil Velikov

Currently the static archive libdrmtest.la links against libdrm.la. Only to have both added to the executables' LDADD. Simplify things a bit, by doing the link in the final module (the executables/tests in this case).

---
 tests/Makefile.am | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
tests/Makefile.am +2 -3
index 90f6405..f008c06 100644
@@ -38,11 +38,10 @@ libdrmtest_la_SOURCES = \
 	drmtest.c \
 	drmtest.h
 
-libdrmtest_la_LIBADD = \
-	$(top_builddir)/libdrm.la \
+LDADD += \
+	libdrmtest.la \
 	$(LIBUDEV_LIBS)
 
-LDADD += libdrmtest.la
 
 XFAIL_TESTS =					\
 	auth					\
Signature · 6 lines
2.1.3

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#5 lore raw
In reply to Emil Velikov

Humble ping. Would anyone be interesting and looking at this trivial series ?

Quoted 30 lines · Emil Velikov
---
 Makefile.am | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
Makefile.am +12 -2
index 3cb516c..e9a041d 100644
@@ -57,7 +57,18 @@ if HAVE_TEGRA
 TEGRA_SUBDIR = tegra
 endif
 
-SUBDIRS = . $(LIBKMS_SUBDIR) $(INTEL_SUBDIR) $(NOUVEAU_SUBDIR) $(RADEON_SUBDIR) $(OMAP_SUBDIR) $(EXYNOS_SUBDIR) $(FREEDRENO_SUBDIR) $(TEGRA_SUBDIR) tests man
+SUBDIRS = \
+       . \
+       $(LIBKMS_SUBDIR) \
+       $(INTEL_SUBDIR) \
+       $(NOUVEAU_SUBDIR) \
+       $(RADEON_SUBDIR) \
+       $(OMAP_SUBDIR) \
+       $(EXYNOS_SUBDIR) \
+       $(FREEDRENO_SUBDIR) \
+       $(TEGRA_SUBDIR) \
+       tests \
+       man
 
 libdrm_la_LTLIBRARIES = libdrm.la
 libdrm_ladir = $(libdir)
--
Quoted 2 lines

2.1.3

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel