Currently src/Makefile.am adds -I.. to some compile flags so that all the #include statements work. This breaks when the build directory is different from the source directory. The right thing to do is add -I$(srcdir)/.. . Patch attached (with an extra tidy-up patch as a bonus). Tested both when building in the source directory and outside it. Regards, Jeremy Henty
On Sat, Jul 17, 2010 at 01:11:13PM +0100, Jeremy Henty wrote:
Currently src/Makefile.am adds -I.. to some compile flags so that all the #include statements work. This breaks when the build directory is different from the source directory. The right thing to do is add -I$(srcdir)/.. . Patch attached (with an extra tidy-up patch as a bonus).
Tested both when building in the source directory and outside it.
Regards,
Jeremy Henty
Committed. -- Cheers Jorge.-
On Sat, Jul 17, 2010 at 10:19:53AM -0400, Jorge Arellano Cid wrote:
On Sat, Jul 17, 2010 at 01:11:13PM +0100, Jeremy Henty wrote:
The right thing to do is add -I$(srcdir)/.. . Patch attached
Committed.
Strange! I carefully prepared the patch with tabs for indentation to be consistent with the rest of the file, yet they have mysteriously transmuted into 7 spaces! Assuming this was not intentional: whitespace fixup patch attached. (Handle with care: it appears to do nothing and if you save it in a way that converts tabs to spaces it *will* do nothing!) Regards, Jeremy Henty
On Sat, Jul 17, 2010 at 08:56:06PM +0100, Jeremy Henty wrote:
On Sat, Jul 17, 2010 at 10:19:53AM -0400, Jorge Arellano Cid wrote:
On Sat, Jul 17, 2010 at 01:11:13PM +0100, Jeremy Henty wrote:
The right thing to do is add -I$(srcdir)/.. . Patch attached
Committed.
Strange! I carefully prepared the patch with tabs for indentation to be consistent with the rest of the file, yet they have mysteriously transmuted into 7 spaces! Assuming this was not intentional: whitespace fixup patch attached. (Handle with care: it appears to do nothing and if you save it in a way that converts tabs to spaces it *will* do nothing!)
My fault, after copy&paste. Fixed. (good to know it worked with spaces too). -- Cheers Jorge.-
OK, the problem with VPATH builds is fixed but I think it can be improved. Firstly, because -I is a preprocessor directive, it should be added to AM_CPP_FLAGS. Secondly, the Makefile uses .. in various places to navigate from the current build directory to where various headers and libraries are. I think it is better to locate other directories from the top of the build and source trees. So I would prefer to use -I$(top_srcdir) instead of -I$(srcdir)/.. , and $(top_builddir)/path/to/lib instead of ../path/to/lib . Patches attached, tested as before with in-source and external builds. Regards, Jeremy Henty
What's the decision on this? I've not heard anythng. Regards, Jeremy Henty On Sun, Jul 18, 2010 at 10:39:21AM +0100, Jeremy Henty wrote:
OK, the problem with VPATH builds is fixed but I think it can be improved.
Firstly, because -I is a preprocessor directive, it should be added to AM_CPP_FLAGS.
Secondly, the Makefile uses .. in various places to navigate from the current build directory to where various headers and libraries are. I think it is better to locate other directories from the top of the build and source trees. So I would prefer to use -I$(top_srcdir) instead of -I$(srcdir)/.. , and $(top_builddir)/path/to/lib instead of ../path/to/lib .
Patches attached, tested as before with in-source and external builds.
Regards,
Jeremy Henty
# HG changeset patch # Parent fec840b80fd3e19e99b9b0e3a56e7be1290a6fa5
diff -r fec840b80fd3 src/Makefile.am --- a/src/Makefile.am Sat Jul 17 20:18:15 2010 +0100 +++ b/src/Makefile.am Sat Jul 17 20:23:48 2010 +0100 @@ -1,9 +1,10 @@ AM_CPPFLAGS= \ + -I$(top_srcdir) \ -DDILLO_SYSCONF='"$(sysconfdir)/"' \ -DDILLO_DOCDIR='"$(docdir)/"' \ @LIBJPEG_CPPFLAGS@ AM_CFLAGS = @LIBPNG_CFLAGS@ -AM_CXXFLAGS = -I$(srcdir)/.. @LIBPNG_CFLAGS@ @LIBFLTK_CXXFLAGS@ +AM_CXXFLAGS = @LIBPNG_CFLAGS@ @LIBFLTK_CXXFLAGS@
SUBDIRS = IO
# HG changeset patch # Parent d813265f53f1d3b2e0ae23f7dd88f4fed2ed2361 diff -r d813265f53f1 -r 000ab53976d1 src/Makefile.am --- a/src/Makefile.am Sat Jul 17 20:23:48 2010 +0100 +++ b/src/Makefile.am Sat Jul 17 20:40:06 2010 +0100 @@ -11,13 +11,13 @@ bin_PROGRAMS = dillo
dillo_LDADD = \ - ../dlib/libDlib.a \ - ../dpip/libDpip.a \ + $(top_builddir)/dlib/libDlib.a \ + $(top_builddir)/dpip/libDpip.a \ IO/libDiof.a \ - ../dw/libDw-widgets.a \ - ../dw/libDw-fltk.a \ - ../dw/libDw-core.a \ - ../lout/liblout.a \ + $(top_builddir)/dw/libDw-widgets.a \ + $(top_builddir)/dw/libDw-fltk.a \ + $(top_builddir)/dw/libDw-core.a \ + $(top_builddir)/lout/liblout.a \ @LIBJPEG_LIBS@ @LIBPNG_LIBS@ @LIBFLTK_LIBS@ @LIBZ_LIBS@ @LIBICONV_LIBS@
dillo_SOURCES = \
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
Jorge Arellano Cid wrote:
On Sat, Jul 24, 2010 at 04:26:35AM +0100, Jeremy Henty wrote:
What's the decision on this? I've not heard anythng.
Committed.
Sorry for the delay. I've had little spare time, and when the spot arrived, the hg server was down.
No problem. Personally I am amazed and impressed that anyone with a family can find any spare time to contribute at all! Jeremy Henty
participants (2)
-
jcid@dillo.org
-
onepoint@starurchin.org