Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
>> Gilles Chanteperdrix wrote:
>>> At some point in time:
>>> https://mail.gna.org/public/xenomai-help/2006-09/msg00181.html
>>>
>>> I started to use exec_prefix and prefix for separating the binaries,
>>> libraries and script that need to be installed on the target from the
>>> include files, documentation and xeno-config script that need to be
>>> installed on the host.
>>>
>>
>> OK, appears reasonable, though I cannot asses if it's a standard usage.
> 
> Do not know either if it is standard, but it may be useful to some users.
> 
>> What do you suggest as a replacement for $(pkgdatadir) then?
>> $(exec_prefix)/share/xenomai? Or where to put the testsuite start scripts?
> 
> I am Ok with anything under $(exec_prefix)...
> 

Then you should like -v3: now exec_prefix-based.

Jan
 scripts/xeno-test.in                  |   13 ++++++++-----
 src/testsuite/cyclic/Makefile.am      |    8 ++++----
 src/testsuite/cyclic/runinfo          |    1 -
 src/testsuite/cyclic/runinfo.in       |    2 +-
 src/testsuite/irqbench/Makefile.am    |   10 +++++-----
 src/testsuite/irqbench/runinfo        |    1 -
 src/testsuite/irqbench/runinfo.in     |    2 +-
 src/testsuite/latency/Makefile.am     |    8 ++++----
 src/testsuite/latency/runinfo         |    1 -
 src/testsuite/latency/runinfo.in      |    2 +-
 src/testsuite/switchbench/Makefile.am |    8 ++++----
 src/testsuite/switchbench/runinfo     |    1 -
 src/testsuite/switchbench/runinfo.in  |    2 +-
 src/testsuite/switchtest/Makefile.am  |    8 ++++----
 src/testsuite/switchtest/runinfo      |    1 -
 src/testsuite/switchtest/runinfo.in   |    2 +-
 16 files changed, 34 insertions(+), 36 deletions(-)
Index: src/testsuite/latency/runinfo
===================================================================
--- src/testsuite/latency/runinfo       (Revision 1947)
+++ src/testsuite/latency/runinfo       (Arbeitskopie)
@@ -1 +0,0 @@
-latency:native+rtdm+timerbench:!./latency;popall:control_c
Index: src/testsuite/latency/runinfo.in
===================================================================
--- src/testsuite/latency/runinfo.in    (Revision 1941)
+++ src/testsuite/latency/runinfo.in    (Arbeitskopie)
@@ -1 +1 @@
-latency:native+rtdm+timerbench:!./latency;popall:control_c
+latency:native+rtdm+timerbench:[EMAIL PROTECTED]@/bin/latency;popall:control_c
Index: src/testsuite/latency/Makefile.am
===================================================================
--- src/testsuite/latency/Makefile.am   (Revision 1947)
+++ src/testsuite/latency/Makefile.am   (Arbeitskopie)
@@ -1,6 +1,6 @@
-testdir = $(exec_prefix)/testsuite/latency
+testdir = $(exec_prefix)/share/xenomai/testsuite/latency
 
-test_PROGRAMS = latency
+bin_PROGRAMS = latency
 
 latency_SOURCES = latency.c
 
@@ -17,8 +17,8 @@ latency_LDADD = \
 
 install-data-local:
        $(mkinstalldirs) $(DESTDIR)$(testdir)
-       $(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-       @echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > 
$(DESTDIR)$(testdir)/run
+       @sed -e's,@exec_prefix\@,$(exec_prefix),g' $(srcdir)/runinfo.in > 
$(DESTDIR)$(testdir)/.runinfo
+       @echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" 
> $(DESTDIR)$(testdir)/run
        @chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
Index: src/testsuite/switchbench/runinfo
===================================================================
--- src/testsuite/switchbench/runinfo   (Revision 1947)
+++ src/testsuite/switchbench/runinfo   (Arbeitskopie)
@@ -1 +0,0 @@
-switchbench:native:!./switchbench;popall:control_c
Index: src/testsuite/switchbench/runinfo.in
===================================================================
--- src/testsuite/switchbench/runinfo.in        (Revision 1941)
+++ src/testsuite/switchbench/runinfo.in        (Arbeitskopie)
@@ -1 +1 @@
-switchbench:native:!./switchbench;popall:control_c
+switchbench:native:[EMAIL PROTECTED]@/bin/switchbench;popall:control_c
Index: src/testsuite/switchbench/Makefile.am
===================================================================
--- src/testsuite/switchbench/Makefile.am       (Revision 1947)
+++ src/testsuite/switchbench/Makefile.am       (Arbeitskopie)
@@ -1,6 +1,6 @@
-testdir = $(exec_prefix)/testsuite/switchbench
+testdir = $(exec_prefix)/share/xenomai/testsuite/switchbench
 
-test_PROGRAMS = switchbench
+bin_PROGRAMS = switchbench
 
 switchbench_SOURCES = switchbench.c
 
@@ -16,8 +16,8 @@ switchbench_LDADD = \
 
 install-data-local:
        $(mkinstalldirs) $(DESTDIR)$(testdir)
-       $(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-       @echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > 
$(DESTDIR)$(testdir)/run
+       @sed -e's,@exec_prefix\@,$(exec_prefix),g' $(srcdir)/runinfo.in > 
$(DESTDIR)$(testdir)/.runinfo
+       @echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" 
> $(DESTDIR)$(testdir)/run
        @chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
Index: src/testsuite/switchtest/runinfo
===================================================================
--- src/testsuite/switchtest/runinfo    (Revision 1947)
+++ src/testsuite/switchtest/runinfo    (Arbeitskopie)
@@ -1 +0,0 @@
-switchtest:posix+rtdm+switchtest:!./switchtest;popall:control_c
Index: src/testsuite/switchtest/runinfo.in
===================================================================
--- src/testsuite/switchtest/runinfo.in (Revision 1941)
+++ src/testsuite/switchtest/runinfo.in (Arbeitskopie)
@@ -1 +1 @@
-switchtest:posix+rtdm+switchtest:!./switchtest;popall:control_c
+switchtest:posix+rtdm+switchtest:[EMAIL 
PROTECTED]@/bin/switchtest;popall:control_c
Index: src/testsuite/switchtest/Makefile.am
===================================================================
--- src/testsuite/switchtest/Makefile.am        (Revision 1947)
+++ src/testsuite/switchtest/Makefile.am        (Arbeitskopie)
@@ -1,6 +1,6 @@
-testdir = $(exec_prefix)/testsuite/switchtest
+testdir = $(exec_prefix)/share/xenomai/testsuite/switchtest
 
-test_PROGRAMS = switchtest
+bin_PROGRAMS = switchtest
 
 switchtest_SOURCES = switchtest.c
 
@@ -13,8 +13,8 @@ switchtest_LDADD = \
 
 install-data-local:
        $(mkinstalldirs) $(DESTDIR)$(testdir)
-       $(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-       @echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > 
$(DESTDIR)$(testdir)/run
+       @sed -e's,@exec_prefix\@,$(exec_prefix),g' $(srcdir)/runinfo.in > 
$(DESTDIR)$(testdir)/.runinfo
+       @echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" 
> $(DESTDIR)$(testdir)/run
        @chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
Index: src/testsuite/cyclic/runinfo
===================================================================
--- src/testsuite/cyclic/runinfo        (Revision 1947)
+++ src/testsuite/cyclic/runinfo        (Arbeitskopie)
@@ -1 +0,0 @@
-cyclictest:posix:!./cyclictest -p 99 -n;popall:control_c
Index: src/testsuite/cyclic/runinfo.in
===================================================================
--- src/testsuite/cyclic/runinfo.in     (Revision 1941)
+++ src/testsuite/cyclic/runinfo.in     (Arbeitskopie)
@@ -1 +1 @@
-cyclictest:posix:!./cyclictest -p 99 -n;popall:control_c
+cyclictest:posix:[EMAIL PROTECTED]@/bin/cyclictest -p 99 -n;popall:control_c
Index: src/testsuite/cyclic/Makefile.am
===================================================================
--- src/testsuite/cyclic/Makefile.am    (Revision 1947)
+++ src/testsuite/cyclic/Makefile.am    (Arbeitskopie)
@@ -1,6 +1,6 @@
-testdir = $(exec_prefix)/testsuite/cyclic
+testdir = $(exec_prefix)/share/xenomai/testsuite/cyclic
 
-test_PROGRAMS = cyclictest
+bin_PROGRAMS = cyclictest
 
 cyclictest_SOURCES = cyclictest.c
 
@@ -13,8 +13,8 @@ cyclictest_LDADD = \
 
 install-data-local:
        $(mkinstalldirs) $(DESTDIR)$(testdir)
-       $(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-       @echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > 
$(DESTDIR)$(testdir)/run
+       @sed -e's,@exec_prefix\@,$(exec_prefix),g' $(srcdir)/runinfo.in > 
$(DESTDIR)$(testdir)/.runinfo
+       @echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" 
> $(DESTDIR)$(testdir)/run
        @chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
Index: src/testsuite/irqbench/runinfo
===================================================================
--- src/testsuite/irqbench/runinfo      (Revision 1947)
+++ src/testsuite/irqbench/runinfo      (Arbeitskopie)
@@ -1 +0,0 @@
-irqloop:posix+rtdm+irqbench:!./irqloop;popall:control_c
Index: src/testsuite/irqbench/runinfo.in
===================================================================
--- src/testsuite/irqbench/runinfo.in   (Revision 1941)
+++ src/testsuite/irqbench/runinfo.in   (Arbeitskopie)
@@ -1 +1 @@
-irqloop:posix+rtdm+irqbench:!./irqloop;popall:control_c
+irqloop:posix+rtdm+irqbench:[EMAIL PROTECTED]@/bin/irqloop;popall:control_c
Index: src/testsuite/irqbench/Makefile.am
===================================================================
--- src/testsuite/irqbench/Makefile.am  (Revision 1947)
+++ src/testsuite/irqbench/Makefile.am  (Arbeitskopie)
@@ -1,9 +1,9 @@
-testdir = $(exec_prefix)/testsuite/irqbench
+testdir = $(exec_prefix)/share/xenomai/testsuite/irqbench

-test_PROGRAMS = irqloop
+bin_PROGRAMS = irqloop
 
 if XENO_TARGET_ARCH_I386
-test_PROGRAMS += irqbench
+bin_PROGRAMS += irqbench
 endif
 
 
@@ -33,8 +33,8 @@ irqbench_LDFLAGS = $(XENO_USER_LDFLAGS)
 
 install-data-local:
        $(mkinstalldirs) $(DESTDIR)$(testdir)
-       $(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-       @echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > 
$(DESTDIR)$(testdir)/run
+       @sed -e's,@exec_prefix\@,$(exec_prefix),g' $(srcdir)/runinfo.in > 
$(DESTDIR)$(testdir)/.runinfo
+       @echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" 
> $(DESTDIR)$(testdir)/run
        @chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
Index: scripts/xeno-test.in
===================================================================
--- scripts/xeno-test.in        (Revision 1947)
+++ scripts/xeno-test.in        (Arbeitskopie)
@@ -4,6 +4,9 @@
 # If you want to test it this way, do: sh xeno-test
 # BusyBox >= 1.1.3 with a make defconfig should provide all needed applets.
 
+prefix="@prefix@"
+pkgdatadir="@exec_prefix@/share/xenomai"
+
 myusage() {
     cat >&1 <<EOF
 xeno-test [options]
@@ -195,24 +198,24 @@ run_w_load() {
     loudly generate_loads $workload
     boxstatus
     (
-        cd `dirname $0`/../testsuite/latency
+        cd $pkgdatadir/testsuite/latency
        loudly ./run -- $XENOT_LATENCY $opts -t0 '# latency'
        loudly ./run -- $XENOT_LATENCY $opts -t1 '# latency'
        loudly ./run -- $XENOT_LATENCY $opts -t2 '# latency'
     )
-    (  cd `dirname $0`/../testsuite/switchtest
+    (  cd $pkgdatadir/testsuite/switchtest
        loudly ./run -- -T 120 $XENOT_SWITCHTEST '# switchtest'
     )
-    (  cd `dirname $0`/../testsuite/switchbench
+    (  cd $pkgdatadir/testsuite/switchbench
        loudly ./run -- -h $XENOT_SWITCHBENCH '# switchbench'
     )
-    (  cd `dirname $0`/../testsuite/cyclic
+    (  cd $pkgdatadir/testsuite/cyclic
        loudly ./run -- -p 10 -n -l 1000 $XENOT_CYCLIC '# cyclictest'
     )
 
     if [ "$XENOT_IRQBENCH" != "" ] ; then
        (
-           cd `dirname $0`/../testsuite/irqbench
+           cd $pkgdatadir/testsuite/irqbench
            loudly ./run -- -P 10 $XENOT_IRQBENCH -t0 '# irqbench user'
            loudly ./run -- -P 10 $XENOT_IRQBENCH -t1 '# irqbench kernel'
            loudly ./run -- -P 10 $XENOT_IRQBENCH -t2 '# irqbench irq-handler'

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to