Skip to contentSkip to conversation

Obtain proper prefix for testsuite build

PATCH In review [email protected] 2 participants 3 messages Mar 26, 2008 – Mar 28, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Obtain proper prefix for testsuite build

Hello list,

Currently, Xenomai/SOLO comes with testsuite for VxWorks emulation.
The path to Xenomai/SOLO installation is fixed. The patch attempts to obtain the proper prefix during build process.

Regards,
-jserv

vxworks/testsuite/Makefile +1 -1
index 62430ff..13ca9a0 100644
@@ -1,4 +1,4 @@
-SOLO := /usr/local/solo
+SOLO := $(shell sed -n '/^prefix/'p ../Makefile | cut -c 9-)
 XENO_CONFIG=$(SOLO)/bin/xeno-config
 prefix := $(shell $(XENO_CONFIG) --prefix)
 
#1 lore raw
Quoted 14 lines · [email protected] wrote:

Hello list,

Currently, Xenomai/SOLO comes with testsuite for VxWorks emulation.
The path to Xenomai/SOLO installation is fixed. The patch attempts to obtain the proper prefix during build process.

Regards,

(quoted diff) +0 -1
-jserv
vxworks/testsuite/Makefile +0 -0
index 62430ff..13ca9a0 100644

vxworks/testsuite/Makefile line 4

Quoted 5 lines
vxworks/testsuite/Makefile +1 -1
@@ -1,4 +1,4 @@
-SOLO := /usr/local/solo
+SOLO := $(shell sed -n '/^prefix/'p ../Makefile | cut -c 9-)
 XENO_CONFIG=$(SOLO)/bin/xeno-config
 prefix := $(shell $(XENO_CONFIG) --prefix)
 

This won't work if you build out of the source tree like autoconf/automake recommend, since it won't find the instantiated Makefile in the upper directory. We could use an autoconf template to patch the prefix into testsuite/Makefile.in, but the testsuite/ directory is meant to be movable and compilable anywhere the user sees fit. This is basically why the Makefile has not been autoconfiscated in the first place.

I guess we will have to leave with the "set your Xenomai install directory for scripts and binaries in your PATH variable" rule. I have removed the absolute SOLO prefix from the Makefile though, it was a left over from my development environment.

Thanks for spotting this.

Signature · 1 line
Philippe.
#2 lore raw
Quoted 6 lines · Philippe Gerum

This won't work if you build out of the source tree like autoconf/automake recommend, since it won't find the instantiated Makefile in the upper directory. We could use an autoconf template to patch the prefix into testsuite/Makefile.in, but the testsuite/ directory is meant to be movable and compilable anywhere the user sees fit. This is basically why the Makefile has not been autoconfiscated in the first place.

hi Philippe,

Indeed. It was just my dirty hack. Thanks for pointing out the details.

Quoted 4 lines

I guess we will have to leave with the "set your Xenomai install directory for scripts and binaries in your PATH variable" rule. I have removed the absolute SOLO prefix from the Makefile though, it was a left over from my development environment.

Good instructions. :-)

Regards,
-jserv