[Debian-astro-commits] [gyoto] 97/221: out-of-tree builds: 'make', 'make check', 'make check-mpi' and 'make install' all work.

Thibaut Jean-Claude Paumard thibaut at moszumanska.debian.org
Fri May 22 20:52:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

thibaut pushed a commit to branch master
in repository gyoto.

commit 232eab11b9f82f29503fd548540124160bc0f155
Author: Thibaut Paumard <paumard at users.sourceforge.net>
Date:   Thu Nov 20 12:55:08 2014 +0100

    out-of-tree builds: 'make', 'make check', 'make check-mpi' and 'make install' all work.
---
 Makefile.in                       | 10 ++++++----
 bin/Makefile.am                   |  4 ++--
 bin/Makefile.in                   |  4 ++--
 configure                         |  5 +++++
 configure.ac                      |  6 +++++-
 doc/{doxyfile => doxyfile.in}     |  2 +-
 doc/user_guide/GyotoManual.tex    | 10 ++++++++--
 doc/user_guide/Makefile.in        | 19 ++++++++++++++-----
 lib/Makefile.am                   |  2 +-
 lib/Makefile.in                   |  2 +-
 yorick/Makefile.in                | 37 +++++++++++++++++++++----------------
 yorick/check-mpi.i                |  2 +-
 yorick/check-polish-doughnut.i    |  4 ++--
 yorick/check-scenery.i            |  4 ++--
 yorick/check-startrace.i          |  2 +-
 yorick/custom1.i                  |  2 ++
 yorick/mk-movie-fork-raytracing.i |  2 +-
 yorick/mk-movie.i                 |  2 +-
 yorick/setpaths.i.in              | 12 ++++++++----
 yorick/stdplug/Makefile.in        | 16 +++++++++-------
 yorick/yorick1.in                 |  2 +-
 21 files changed, 94 insertions(+), 55 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 1f77b1d..9a65eb8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -89,9 +89,9 @@ DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
 	$(top_srcdir)/yorick/stdplug/Makefile.in \
 	$(top_srcdir)/yorick/gyoto.info.in \
 	$(top_srcdir)/yorick/yorick1.in \
-	$(top_srcdir)/yorick/setpaths.i.in $(srcdir)/gyoto.in COPYING \
-	compile config.guess config.sub depcomp install-sh missing \
-	ltmain.sh
+	$(top_srcdir)/yorick/setpaths.i.in $(srcdir)/gyoto.in \
+	$(top_srcdir)/doc/doxyfile.in COPYING compile config.guess \
+	config.sub depcomp install-sh missing ltmain.sh
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_append_compile_flags.m4 \
 	$(top_srcdir)/m4/ax_append_flag.m4 \
@@ -110,7 +110,7 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h $(top_builddir)/include/GyotoConfig.h
 CONFIG_CLEAN_FILES = doc/Makefile doc/user_guide/Makefile \
 	yorick/Makefile yorick/stdplug/Makefile yorick/gyoto.info \
-	yorick/yorick1 yorick/setpaths.i gyoto
+	yorick/yorick1 yorick/setpaths.i gyoto doc/doxyfile
 CONFIG_CLEAN_VPATH_FILES =
 AM_V_P = $(am__v_P_ at AM_V@)
 am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
@@ -459,6 +459,8 @@ yorick/setpaths.i: $(top_builddir)/config.status $(top_srcdir)/yorick/setpaths.i
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 gyoto: $(top_builddir)/config.status $(srcdir)/gyoto.in
 	cd $(top_builddir) && $(SHELL) ./config.status $@
+doc/doxyfile: $(top_builddir)/config.status $(top_srcdir)/doc/doxyfile.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
 
 mostlyclean-libtool:
 	-rm -f *.lo
diff --git a/bin/Makefile.am b/bin/Makefile.am
index 33c6f92..d2dac21 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -1,5 +1,5 @@
 ACLOCAL_AMFLAGS = -I m4 
-AM_CPPFLAGS = -I at top_builddir@/include $(XERCESCPPFLAGS) $(UDUNITS_CPPFLAGS) $(BOOST_CPPFLAGS)
+AM_CPPFLAGS = -I at top_srcdir@/include $(XERCESCPPFLAGS) $(UDUNITS_CPPFLAGS) $(BOOST_CPPFLAGS)
 AM_LDFLAGS  = $(XERCESLDFLAGS) $(PTHREAD_LIBS)
 AM_CXXFLAGS = $(PTHREAD_CFLAGS)
 CLEANFILES =
@@ -33,7 +33,7 @@ gyoto-mpi-worker. at sovers@.1: gyoto-mpi-worker.1
 
 export PATH := .:$(PATH)
 
-EXAMPLE_DIR = ../doc/examples/
+EXAMPLE_DIR = $(top_srcdir)/doc/examples/
 CHECK_RESULTS = \
         example-thin-disk.fits \
         example-thin-disk-KS.fits \
diff --git a/bin/Makefile.in b/bin/Makefile.in
index 2c18f83..d4b8830 100644
--- a/bin/Makefile.in
+++ b/bin/Makefile.in
@@ -395,7 +395,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 ACLOCAL_AMFLAGS = -I m4 
-AM_CPPFLAGS = -I at top_builddir@/include $(XERCESCPPFLAGS) $(UDUNITS_CPPFLAGS) $(BOOST_CPPFLAGS)
+AM_CPPFLAGS = -I at top_srcdir@/include $(XERCESCPPFLAGS) $(UDUNITS_CPPFLAGS) $(BOOST_CPPFLAGS)
 AM_LDFLAGS = $(XERCESLDFLAGS) $(PTHREAD_LIBS)
 AM_CXXFLAGS = $(PTHREAD_CFLAGS)
 CLEANFILES = $(am__append_5) $(CHECK_RESULTS) $(CHECK_MPI_RESULTS) \
@@ -409,7 +409,7 @@ gyoto_mpi_worker_ at sovers@_SOURCES = gyoto-mpi-worker.C
 gyoto_mpi_worker_ at sovers@_LDADD = @top_builddir@/lib/libgyoto at FEATURES@.la -lboost_mpi -lboost_serialization
 gyoto_mpi_worker_ at sovers@_CPPFLAGS = $(AM_CPPFLAGS) $(CFITSIOCPPFLAGS)
 gyoto_mpi_worker_ at sovers@_LDFLAGS = $(AM_LDFLAGS) $(CFITSIOLDFLAGS) -export-dynamic
-EXAMPLE_DIR = ../doc/examples/
+EXAMPLE_DIR = $(top_srcdir)/doc/examples/
 CHECK_RESULTS = example-thin-disk.fits example-thin-disk-KS.fits \
 	example-thin-disk-minkowski-cartesian.fits \
 	example-thin-disk-minkowski-spherical.fits \
diff --git a/configure b/configure
index 6fccd69..894bf67 100755
--- a/configure
+++ b/configure
@@ -18564,6 +18564,10 @@ if test "x$YORICK" != "x"; then :
 fi
 if test "x$DOXYGEN" != "x" && test "x$mkdoc" == "xyes"; then :
   mySUBDIRS="$mySUBDIRS doc"
+   ac_config_files="$ac_config_files doc/doxyfile"
+
+
+
 fi
 
 cat >confcache <<\_ACEOF
@@ -19721,6 +19725,7 @@ do
     "yorick/yorick1") CONFIG_FILES="$CONFIG_FILES yorick/yorick1" ;;
     "yorick/setpaths.i") CONFIG_FILES="$CONFIG_FILES yorick/setpaths.i" ;;
     "gyoto") CONFIG_FILES="$CONFIG_FILES gyoto" ;;
+    "doc/doxyfile") CONFIG_FILES="$CONFIG_FILES doc/doxyfile" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
diff --git a/configure.ac b/configure.ac
index 07e9e6d..38e0a64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -726,7 +726,11 @@ AS_IF([test "x$YORICK" != "x"],
 		   [chmod a+x gyoto])
   ]
 )
-AS_IF([test "x$DOXYGEN" != "x" && test "x$mkdoc" == "xyes"], [mySUBDIRS="$mySUBDIRS doc"])
+AS_IF([test "x$DOXYGEN" != "x" && test "x$mkdoc" == "xyes"],
+  [mySUBDIRS="$mySUBDIRS doc"
+   AC_CONFIG_FILES([doc/doxyfile])
+  ]
+)
 AC_SUBST([mySUBDIRS])
 AC_OUTPUT
 
diff --git a/doc/doxyfile b/doc/doxyfile.in
similarity index 99%
rename from doc/doxyfile
rename to doc/doxyfile.in
index 9574b1f..3860d5f 100644
--- a/doc/doxyfile
+++ b/doc/doxyfile.in
@@ -564,7 +564,7 @@ WARN_LOGFILE           =
 # directories like "/usr/src/myproject". Separate the files or directories 
 # with spaces.
 
-INPUT                  = ../include
+INPUT                  = @top_srcdir@/include
 
 # This tag can be used to specify the character encoding of the source files 
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
diff --git a/doc/user_guide/GyotoManual.tex b/doc/user_guide/GyotoManual.tex
index 985fcc5..b95865f 100644
--- a/doc/user_guide/GyotoManual.tex
+++ b/doc/user_guide/GyotoManual.tex
@@ -17,6 +17,10 @@
 
 \documentclass[a4paper,12pt]{article}
 
+% The build system will provide this command to make out-of-tree build
+% work
+\providecommand{\GyotoSrcDir}{../..}
+
 \usepackage[]{natbib}  
 
 \usepackage{fullpage}
@@ -44,7 +48,7 @@
 \newcommand{\Astrobj}{\texttt{Astrobj}}
 \newcommand{\Spectrum}{\texttt{Spectrum}}
 
-\graphicspath{{../images/}}
+\graphicspath{{\GyotoSrcDir/doc/images/}}
 
 
 \begin{document}
@@ -74,6 +78,8 @@
 
 \section*{Introduction - Scope of this Guide}
 
+
+
 This Guide aims at giving a general presentation of the \textit{General relativitY Orbit Tracer of Observatoire de Paris}, \texttt{GYOTO} (pronounced \textipa{[dZIoto]}, as for the Italian trecento painter Giotto di Bondone). This text is not a lecture on ray-tracing techniques and is only devoted to presenting the code so that it can be quickly handled by any user. Readers interested in the physics behind \texttt{GYOTO} are referred to~\citet[][and references therein]{vincent11a,vincent [...]
 
 \texttt{GYOTO} is an open source C++ code with a Yorick plug-in that computes null and time-like geodesics in the Kerr metric as well as in any metric computed within the framework of the 3+1 formalism of general relativity. This code allows to compute mainly images and spectra of astrophysical sources emitting electromagnetic radiation in the vicinity of compact objects (e.g. accretion disks or nearby stars). 
@@ -1036,7 +1042,7 @@ this interpreted interface to perform unit tests on your code in a
 more fine-grained manner than a full-featured ray-traced image.
 
 \bibliographystyle{kluwer}
-\bibliography{GyotoManual}
+\bibliography{\GyotoSrcDir/doc/user_guide/GyotoManual}
 
 
 \end{document}
diff --git a/doc/user_guide/Makefile.in b/doc/user_guide/Makefile.in
index fb6adf5..0a7c76f 100644
--- a/doc/user_guide/Makefile.in
+++ b/doc/user_guide/Makefile.in
@@ -1,17 +1,26 @@
 PDFLATEX=@PDFLATEX@
 BIBTEX=@BIBTEX@
 
+PDFLATEXCMD = $(PDFLATEX) \
+ '\nonstopmode \newcommand{\GyotoSrcDir}{@top_srcdir@} \input{@srcdir@/GyotoManual.tex}'
+
+vpath %.tex @srcdir@
+vpath %.bib @srcdir@
+
+TEXINPUTS=.:@srcdir@:@top_srcdir@/images/:
+export TEXINPUTS
+
 all: GyotoManual.pdf
 
 GyotoManual.aux: GyotoManual.tex
-	$(PDFLATEX) GyotoManual.tex
+	$(PDFLATEXCMD)
 
-GyotoManual.bbl: GyotoManual.bib GyotoManual.aux
-	$(BIBTEX) GyotoManual.aux
+GyotoManual.bbl: GyotoManual.aux GyotoManual.bib
+	$(BIBTEX) $<
 
 GyotoManual.pdf: GyotoManual.tex GyotoManual.bbl
-	$(PDFLATEX) GyotoManual.tex
-	$(PDFLATEX) GyotoManual.tex
+	$(PDFLATEXCMD)
+	$(PDFLATEXCMD)
 
 clean:
 	-rm GyotoManual.aux GyotoManual.bbl GyotoManual.blg GyotoManual.log
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 0007040..c734138 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -10,7 +10,7 @@ endif
 
 # HEADERS: where they are, where to install them
 library_includedir=$(includedir)/Gyoto
-library_include_HEADERS=$(top_srcdir)/include/*.h
+library_include_HEADERS=$(top_srcdir)/include/*.h $(top_builddir)/include/*.h
 
 # MAIN LIBRARY
 lib_LTLIBRARIES = libgyoto at FEATURES@.la
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 1aedf1d..ae050eb 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -421,7 +421,7 @@ AM_CXXFLAGS = $(PTHREAD_CFLAGS) -DGYOTO_PREFIX=\"${prefix}\"
 
 # HEADERS: where they are, where to install them
 library_includedir = $(includedir)/Gyoto
-library_include_HEADERS = $(top_srcdir)/include/*.h
+library_include_HEADERS = $(top_srcdir)/include/*.h $(top_builddir)/include/*.h
 
 # MAIN LIBRARY
 lib_LTLIBRARIES = libgyoto at FEATURES@.la
diff --git a/yorick/Makefile.in b/yorick/Makefile.in
index 3c6e7ea..c5ac7a9 100644
--- a/yorick/Makefile.in
+++ b/yorick/Makefile.in
@@ -16,6 +16,8 @@ TGT=$(DEFAULT_TGT)
 
 #include ../local_settings
 
+vpath %.C @srcdir@
+
 CXXFLAGS=@CXXFLAGS@
 CPPFLAGS=@CPPFLAGS@
 XERCESLDFLAGS=@XERCESLDFLAGS@
@@ -27,13 +29,13 @@ DYLIB_VAR=@DYLIB_VAR@
 PTHREAD_CFLAGS= @PTHREAD_CFLAGS@
 PTHREAD_LIBS= @PTHREAD_LIBS@
 
-YGYOTO_C = $(shell ls *.C)
-GYOTO_C = $(shell ls ../lib/*.C)
+YGYOTO_C = $(shell ls @srcdir@/*.C)
+GYOTO_C = $(shell ls @top_srcdir@/lib/*.C)
 GYOTO_OBJ = $(GYOTO_C:.C=.o)
-GYOTO_H = $(shell ls ../include/*.h)
+GYOTO_H = $(shell ls @top_srcdir@/include/*.h)
 
 PKG_NAME=gyoto
-PKG_I=gyoto.i
+PKG_I=@srcdir@/gyoto.i
 
 OBJS=gyoto_utils.o gyoto_Metric.o gyoto_Photon.o \
 	gyoto_Scenery.o gyoto_Screen.o gyoto_Idx.o gyoto_Spectrum.o \
@@ -48,7 +50,7 @@ PKG_EXENAME=yorick
 # PKG_DEPLIBS=-Lsomedir -lsomelib   for dependencies of this package
 PKG_DEPLIBS=-L../lib/.libs -lgyoto at FEATURES@ $(XERCESLDFLAGS) $(PTHREAD_LIBS)
 # set compiler (or rarely loader) flags specific to this package
-PKG_CFLAGS= -I../include $(XERCESCPPFLAGS) $(UDUNITS_CPPFLAGS) $(BOOST_CPPFLAGS) $(PTHREAD_CFLAGS)
+PKG_CFLAGS= -I at top_srcdir@/include $(XERCESCPPFLAGS) $(UDUNITS_CPPFLAGS) $(BOOST_CPPFLAGS) $(PTHREAD_CFLAGS)
 PKG_LDFLAGS= $(PTHREAD_CFLAGS)
 
 # list of additional package names you want in PKG_EXENAME
@@ -61,7 +63,7 @@ PKG_CLEAN=
 # autoload file for this package, if any
 PKG_I_START=
 # non-pkg.i include files for this package, if any
-PKG_I_EXTRA=gyoto_constants.i gyotoy.i gyoto_namespace.i
+PKG_I_EXTRA=@srcdir@/gyoto_constants.i @srcdir@/gyotoy.i @srcdir@/gyoto_namespace.i
 
 # -------------------------------- standard targets and rules (in Makepkg)
 
@@ -116,31 +118,34 @@ all: gyoto.so gyoto_std.so
 gyoto_std.so: stdplug/gyoto_std.so
 	cp stdplug/gyoto_std.so ./
 
-stdplug/gyoto_std.so: stdplug/*.C
+stdplug/gyoto_std.so: @srcdir@/stdplug/*.C
 	cd stdplug; $(MAKE)
 
 gyoto.so: gyoto.i $(OBJS)
 
-check-dll: $(PKG_DLL) check.i
+yorick: yorick1
 	cp yorick1 yorick
+custom.i: @srcdir@/custom1.i
+	cp $< $@
+
+check-dll: $(PKG_DLL) check.i yorick custom.i
 	unset GYOTO_PLUGINS && \
 	GYOTO_CHECK_NODISPLAY=true \
 	./yorick -i check.i
 
-check-mpi: $(PKG_DLL) check-mpi.i
-	cp yorick1 yorick
+check-mpi: $(PKG_DLL) check-mpi.i yorick custom.i
 	unset GYOTO_PLUGINS && \
 	GYOTO_CHECK_NODISPLAY=true \
 	./yorick -i check-mpi.i
 
 install::
 	cd stdplug; make install
-	$(YNSTALL) ygyoto.h ygyoto_idx.h ygyoto_supplier.C $(DEST_Y_SITE)/include
-	$(YNSTALL) gyotoy.xml $(DEST_Y_SITE)/glade
-	$(YNSTALL) gyotoy.png $(DEST_Y_SITE)/data
-	$(YNSTALL) gyotoy $(DEST_Y_SITE)/bin
+	$(YNSTALL) @srcdir@/ygyoto.h @srcdir@/ygyoto_idx.h @srcdir@/ygyoto_supplier.C $(DEST_Y_SITE)/include
+	$(YNSTALL) @srcdir@/gyotoy.xml $(DEST_Y_SITE)/glade
+	$(YNSTALL) @srcdir@/gyotoy.png $(DEST_Y_SITE)/data
+	$(YNSTALL) @srcdir@/gyotoy $(DEST_Y_SITE)/bin
 	-ln $(DEST_Y_SITE)/bin/gyotoy $(DESTDIR)$(prefix)/bin/
-	$(YNSTALL) gyotoy.1 $(DESTDIR)$(prefix)/share/man/man1
+	$(YNSTALL) @srcdir@/gyotoy.1 $(DESTDIR)$(prefix)/share/man/man1
 	$(YNSTALL) gyoto.info $(DEST_PKG_INSTALLED_DIR)
 
 uninstall::
@@ -159,7 +164,7 @@ clean::
 
 distclean:: $(Y_EXE)
 	cd stdplug; $(Y_EXE) -batch make.i; make distclean
-	-rm yorick
+	-rm yorick custom.i
 
 %: ;
 
diff --git a/yorick/check-mpi.i b/yorick/check-mpi.i
index 1271f3f..77c27cc 100644
--- a/yorick/check-mpi.i
+++ b/yorick/check-mpi.i
@@ -49,7 +49,7 @@ if (!have_mpi && inited) error, "MPI should not be initializable";
 done;
 
 doing, "Reading Scenery";
-sc = Scenery("../doc/examples/example-complex-astrobj.xml");
+sc = Scenery(GYOTO_EXAMPLES_DIR+"example-complex-astrobj.xml");
 done;
 
 doing, "Spawning workers";
diff --git a/yorick/check-polish-doughnut.i b/yorick/check-polish-doughnut.i
index a0ff465..4bb796c 100644
--- a/yorick/check-polish-doughnut.i
+++ b/yorick/check-polish-doughnut.i
@@ -57,7 +57,7 @@ write, format="%s\n", "-----------------------------";
 
 if (gyoto.haveUDUNITS() && gyoto.haveXerces()) {
   write, format="%s", "Creating PolishDoughnut from file... ";
-  pd = gyoto_Scenery("../doc/examples/example-polish-doughnut.xml").astrobj();
+  pd = gyoto_Scenery(GYOTO_EXAMPLES_DIR+"example-polish-doughnut.xml").astrobj();
   write, format="%s\n", "done.";
   
   write, format="%s\n", "Printing object:";
@@ -66,7 +66,7 @@ if (gyoto.haveUDUNITS() && gyoto.haveXerces()) {
   write, format="%s\n", "-----------------------------";
 
   write, format="%s", "Reading PolishDoughnut scenery... ";
-  sc = gyoto_Scenery("../doc/examples/example-polish-doughnut.xml") ;
+  sc = gyoto_Scenery(GYOTO_EXAMPLES_DIR+"example-polish-doughnut.xml") ;
   write, format="%s\n", "done.";
   
   write, format="%s", "Setting spectro... ";
diff --git a/yorick/check-scenery.i b/yorick/check-scenery.i
index 9e12a23..9accf75 100644
--- a/yorick/check-scenery.i
+++ b/yorick/check-scenery.i
@@ -111,7 +111,7 @@ if (gyoto_haveXerces()) {
   remove, "test.xml";
 
   write , format="%s", "Reading Scenery from XML description... ";
-  sc3=gyoto_Scenery("../doc/examples/example-moving-star.xml");
+  sc3=gyoto_Scenery(GYOTO_EXAMPLES_DIR+"example-moving-star.xml");
  } else {
   write , format="%s", "No Xerces, creating scenery from scratch... ";
   gg  = gyoto_KerrBL();
@@ -213,7 +213,7 @@ ph = gyoto_Photon(initcoord=sc3, 6, 19);
 ph.is_hit();
 
 doing, "Reading Scenery...";
-sc=Scenery("../doc/examples/example-complex-astrobj.xml");
+sc=Scenery(GYOTO_EXAMPLES_DIR+"example-complex-astrobj.xml");
 done;
 
 sc, nthreads=8, nprocesses=0, mpispawn=0;
diff --git a/yorick/check-startrace.i b/yorick/check-startrace.i
index 4cd3848..8f21931 100644
--- a/yorick/check-startrace.i
+++ b/yorick/check-startrace.i
@@ -22,7 +22,7 @@
 begin_section, "StarTrace Astrobj";
 
 if (gyoto_haveXerces()) {
-  sc = gyoto.Scenery("../doc/examples/example-moving-star.xml");
+  sc = gyoto.Scenery(GYOTO_EXAMPLES_DIR+"example-moving-star.xml");
   noop, sc.screen.mask(0); // make sure no mask is set yet
   st = sc.astrobj();
  } else {
diff --git a/yorick/custom1.i b/yorick/custom1.i
new file mode 100644
index 0000000..4ffecb2
--- /dev/null
+++ b/yorick/custom1.i
@@ -0,0 +1,2 @@
+#include "setpaths.i"
+process_argv;
diff --git a/yorick/mk-movie-fork-raytracing.i b/yorick/mk-movie-fork-raytracing.i
index fe77cdf..e7370a1 100755
--- a/yorick/mk-movie-fork-raytracing.i
+++ b/yorick/mk-movie-fork-raytracing.i
@@ -24,7 +24,7 @@
 
 
 //// PARAMETERS
-ifile="../doc/examples/example-moving-star.xml";
+ifile=GYOTO_EXAMPLES_DIR+"example-moving-star.xml";
 ofile="test.ogg";
 vcodec="libtheora";
 resolution=64;
diff --git a/yorick/mk-movie.i b/yorick/mk-movie.i
index 82b506c..67f997b 100755
--- a/yorick/mk-movie.i
+++ b/yorick/mk-movie.i
@@ -19,7 +19,7 @@ yorick(20187,0x7fff706cdcc0) malloc: *** error for object 0x10038d0c8: incorrect
 #include "pnm.i"
 #include "libav.i"
 
-ifile="../doc/examples/example-moving-star.xml";
+ifile=GYOTO_EXAMPLES_DIR+"example-moving-star.xml";
 ofile="test_single.ogg";
 resolution=64;
 // use jmin and jmax to fix aspect ratio
diff --git a/yorick/setpaths.i.in b/yorick/setpaths.i.in
index 648e577..2ab78d6 100644
--- a/yorick/setpaths.i.in
+++ b/yorick/setpaths.i.in
@@ -24,9 +24,13 @@
   system.
  */
 
-abs_top_builddir="@abs_top_builddir@";
+abs_top_srcdir="@abs_top_srcdir@";
+abs_top_builddir="@abs_top_srcdir@";
 
 #include "pathfun.i"
-dirs=abs_top_builddir+"/yorick/"+["", "stdplug/"];
-plug_dir,_(dirs, plug_dir());
-set_path, pathform(dirs)+":"+get_path();
+idirs=abs_top_srcdir+"/yorick/"+["", "stdplug/"];
+sodirs=abs_top_builddir+"/yorick/"+["", "stdplug/"];
+plug_dir,_(sodirs, plug_dir());
+set_path, pathform(idirs)+":"+get_path();
+
+GYOTO_EXAMPLES_DIR=abs_top_builddir+"/doc/examples/";
diff --git a/yorick/stdplug/Makefile.in b/yorick/stdplug/Makefile.in
index 96b63b8..b831069 100644
--- a/yorick/stdplug/Makefile.in
+++ b/yorick/stdplug/Makefile.in
@@ -9,11 +9,13 @@ Y_HOME_PKG=
 # ----------------------------------------------------- optimization flags
 
 # options for make command line, e.g.-   make COPT=-g TGT=exe
-COPT=$(COPT_DEFAULT) -L../../lib -I../../include
+COPT=$(COPT_DEFAULT) -L../../lib -I at top_srcdir@/include -I at top_builddir@/include
 TGT=$(DEFAULT_TGT)
 
 # ------------------------------------------------ macros for this package
 
+vpath %.C @srcdir@
+
 CXXFLAGS=@CXXFLAGS@
 CPPFLAGS=@CPPFLAGS@
 XERCESLDFLAGS=@XERCESLDFLAGS@
@@ -29,13 +31,13 @@ PTHREAD_LIBS= @PTHREAD_LIBS@
 SYS=@SYS@
 plugin_sfx=@plugin_sfx@
 
-YGYOTO_C = $(shell ls ../*.C)
-GYOTO_C = $(shell ls ../../lib/*.C)
+YGYOTO_C = $(shell ls @srcdir@/../*.C)
+GYOTO_C = $(shell ls @top_srcdir@/lib/*.C)
 GYOTO_OBJ = $(GYOTO_C:.C=.o)
-GYOTO_H = $(shell ls ../../include/*.h)
+GYOTO_H = $(shell ls @top_srcdir@/include/*.h)
 
 PKG_NAME=gyoto_std
-PKG_I=gyoto_std.i
+PKG_I=@srcdir@/gyoto_std.i
 
 OBJS = StdPlug.o gyoto_KerrBL.o gyoto_KerrKS.o \
 	gyoto_Star.o gyoto_StarTrace.o gyoto_FixedStar.o \
@@ -56,7 +58,7 @@ PKG_DEPLIBS+=-bundle_loader ../../lib/.libs/libgyoto-stdplug.$(plugin_sfx) \
 endif
 
 # set compiler (or rarely loader) flags specific to this package
-PKG_CFLAGS= -I../../include -I.. $(XERCESCPPFLAGS) $(CFITSIOCPPFLAGS) $(UDUNITS_CPPFLAGS) $(BOOST_CPPFLAGS) $(PTHREAD_CFLAGS)
+PKG_CFLAGS= -I at top_srcdir@/include -I at top_srcdir@/yorick $(XERCESCPPFLAGS) $(CFITSIOCPPFLAGS) $(UDUNITS_CPPFLAGS) $(BOOST_CPPFLAGS) $(PTHREAD_CFLAGS)
 PKG_LDFLAGS= $(PTHREAD_CFLAGS)
 
 # list of additional package names you want in PKG_EXENAME
@@ -117,7 +119,7 @@ LD_EXE=$(CXX) $(LDFLAGS) $(PLUG_EXPORT)
 #	$(CC) $(CPPFLAGS) $(CFLAGS) -DMY_SWITCH -o $@ -c myfunc.c
 
 
-StdPlug.o: ../ygyoto_supplier.C ../ygyoto.h 
+StdPlug.o: @srcdir@/../ygyoto_supplier.C @srcdir@/../ygyoto.h 
 	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c -o $@ $<
 
 ../../lib/libgyoto.a: $(GYOTO_C) $(GYOTO_H)
diff --git a/yorick/yorick1.in b/yorick/yorick1.in
index 0ead7c4..5403424 100644
--- a/yorick/yorick1.in
+++ b/yorick/yorick1.in
@@ -28,6 +28,6 @@ YORICK=@YORICK@
 export ${DYLIB_VAR}=${abs_top_builddir}/lib/.libs:${!DYLIB_VAR}
 export PATH=${abs_top_builddir}/bin:${PATH}
 
-${YORICK} -i ${abs_top_builddir}/yorick/setpaths.i $@
+${YORICK} -i ${abs_top_builddir}/yorick/setpaths.i $@  -i ${abs_top_builddir}/yorick/setpaths.i
 
 exit 0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/gyoto.git



More information about the Debian-astro-commits mailing list