Skip to contentSkip to conversation

Patch for configure --includedir

Xenomai-core Paul 1 participant 1 message Aug 10, 2007 Kbuild

lore
Share & tools
lore

Paul

author
#0 lore raw

There is a small problem when --includedir is passed to configure which bites int the install-data-local rule in include/Makefile.am - The includedir variable is overridden by $(prefix)/include which causes a fatal error when attempting to generate symlinks.

For example:

./configure --prefix=/tmp/foo --includedir=/usr/foo

make install DESTDIR=/tmp/testit

<snip>
rm -f /tmp/testit/tmp/foo/include/asm
ln -s asm-x86_64 /tmp/testit/tmp/foo/include/asm
ln: creating symbolic link /tmp/testit/tmp/foo/include/asm' to asm-x86_64':
No such file or directory
make[3]: *** [install-data-local] Error 1
make[3]: Leaving directory `/tmp/xenomai/include'

Regards, Paul.

Makefile.am +1 -1
@@ -1,4 +1,4 @@
-includedir = $(prefix)/include
+#includedir = $(prefix)/include
 
 include_HEADERS = \
 	rtdk.h
include/Makefile.am +2 -2
Index: sim/include/Makefile.am
===================================================================
@@ -1,3 +1,3 @@
-includedir = $(prefix)/include/asm-sim
+includesubdir = $(prefix)/include/asm-sim
 
-nodist_include_HEADERS=$(CONFIG_HEADER)
+nodist_includesub_HEADERS=$(CONFIG_HEADER)
skins/posix/Makefile.am +2 -2
Index: sim/skins/posix/Makefile.am
===================================================================
@@ -1,6 +1,6 @@
 vpath %.c $(top_srcdir)/../ksrc/skins/posix
 
-includedir = $(prefix)/include/asm-sim
+includesubdir = $(prefix)/include/asm-sim
 
 CC = $(top_builddir)/gcic/gcic
 
@@ -42,7 +42,7 @@ nodist_libposix_sim_a_SOURCES = \
 	shm.c \
 	module.c
 
-include_HEADERS = \
+includesub_HEADERS = \
 	posix_overrides.h
 
 SUBDIRS = . testsuite demos