[BRLTTY] Build system patches

Stepan Kasal kasal at ucw.cz
Thu Oct 29 13:12:42 EDT 2009


Hello,
  when building brltty for Fedora GNU/Linux distribution, I created
3 patches (find them attached to this mail).

(The latter two of the patches have been written earlier; I apologize
that I forgot to submit them back then.)

1) brltty-autoconf-quote.patch
==============================

The brltty-summary mangles the values of some variables.  For
example, observe:

$ ./configure
...
$ grep sysconfdir: config.status
   sysconfdir: ${prefix}/etc
$ ./config.status brltty-summary |grep sysconfdir:
   sysconfdir: /etc

The brltty-summary should display the same as the previous command.

This patch fixes it by replacing "" by '' at the right place.

A side note:
If you think that it would be better to display the expanded values,
i.e. /usr/local/etc in this case, please forgive it.
It's not only hard to implement (you have to eval recursively), it is
also slightly incorrect, as the variables might get overriden at
build time.

Actuallym, when thinking more about it, it would be more consistent
to single quote the default value in  all the
BRLTTY_ARG_*...[DIRECTORY] macro calls.

I noticed that some of these arguments just copy the standard ones:
manpage-directory .. mandir
program-directory .. bindir
With single quotes, one can perhaps override bindir by
	make install bindir=/some/other/bin
and it will work, changing PROGRAM_DIRECTORY for that particular run
of make.

Sorry for this diversion, back to point.

2) brltty-cppflags.patch
========================

To get the jni things right, I set CPPFLAGS on configure argument line.
This patch makes sure that it gets propagated correctly.

3) brltty-parallel.patch
========================

Fedora does "make -j4" by default (4 is the actual number of CPUs on
the system).  This discovered that your makefiles are not completely
correct.  This patch fixes the particular problem I encountered.

Anyway, Recursive Make is Harmful.

I'm ready to answer questions.

Cheers,
	Stepan Kasal
-------------- next part --------------
2009-10-28  Stepan Kasal  <skasal at redhat.com>

	* aclocal.m4 (BRLTTY_SUMMARY_END): Use single quotes when
	passing the value of brltty_summary_lines, so that is not
	garbled.

--- brltty-4.1/aclocal.m4.orig	2009-10-08 04:32:49.000000000 +0200
+++ brltty-4.1/aclocal.m4	2009-10-28 14:28:30.000000000 +0100
@@ -396,7 +396,7 @@
 AC_DEFUN([BRLTTY_SUMMARY_END], [dnl
 AC_CONFIG_COMMANDS([brltty-summary],
    [AC_MSG_NOTICE([${brltty_summary_lines}])],
-   [brltty_summary_lines="${brltty_summary_lines}"]
+   [brltty_summary_lines='${brltty_summary_lines}']
 )])
 
 AC_DEFUN([BRLTTY_SUMMARY_ITEM], [dnl
-------------- next part --------------
2009-05-06  Stepan Kasal  <skasal at redhat.com>

	* Bindings/Java/Makefile.in: Propagate configure-time CPPFLAGS.

--- brltty-3.10/Bindings/Java/Makefile.in.cppflags	2008-07-17 00:19:45.000000000 +0200
+++ brltty-3.10/Bindings/Java/Makefile.in	2009-05-06 17:33:02.000000000 +0200
@@ -36,6 +36,8 @@
 JAVA_JNI_FLAGS = @JAVA_JNI_FLAGS@
 JAVA_JNI_DESTDIR = $(INSTALL_ROOT)
 
+CPPFLAGS = @CPPFLAGS@
+
 all: jar jni doc
 
 JAVA_SOURCES = $(SRC_DIR)/Brlapi.java \
@@ -56,7 +58,7 @@
 	$(MKLIB:<name>=$(API_NAME)) $@ bindings.$O $(API_LDFLAGS)
 
 bindings.$O:
-	$(CC) $(LIBCFLAGS) $(JAVA_JNI_FLAGS) -o $@ -c $(SRC_DIR)/bindings.c
+	$(CC) $(CPPFLAGS) $(LIBCFLAGS) $(JAVA_JNI_FLAGS) -o $@ -c $(SRC_DIR)/bindings.c
 
 JAVA_JAR_FILE = $(API_NAME).jar
 jar: $(JAVA_JAR_FILE)
-------------- next part --------------
2008-09-17  Stepan Kasal  <skasal at redhat.com>

	* Programs/Makefile.in (braille-drivers): Add
	prerequisity `all' to prevent race of this make with nested
	"make brlapi" when parallel make is used.  Recursive make is
	harmful.

--- brltty-4.0/Programs/Makefile.in.parallel	2009-10-07 20:48:57.000000000 +0200
+++ brltty-4.0/Programs/Makefile.in	2009-10-07 20:50:03.000000000 +0200
@@ -428,7 +428,7 @@
 
 ###############################################################################
 
-braille-drivers: txt2hlp$X
+braille-drivers: txt2hlp$X api
 	for driver in $(BRAILLE_EXTERNAL_DRIVER_NAMES); \
 	do (cd $(BLD_TOP)$(BRL_DIR)/$$driver && $(MAKE) braille-driver braille-all) || exit 1; \
 	done


More information about the BRLTTY mailing list