Actually, I think it would be more robust to remove it entirely, and add algo.stamp to Makefile.am instead - what do you think?
I'm using this patch, and it works well for me.
- add algo.stamp to HTML_STAMPS (this eventually calls hevea -fix)
- add targets for giacfr.tex and algo.pdf (optionally using XVFB_RUN for headless buildbots)
- build PDF_LOCAL HTML_STAMPS before all-local instead of before install-data-local
- remove calls to hevea -fix from icas.cc
Code : Tout sélectionner
diff -ru giac-1.2.3-orig/doc/fr/Makefile.am giac-1.2.3/doc/fr/Makefile.am
--- giac-1.2.3-orig/doc/fr/Makefile.am 2016-09-22 13:36:57.000000000 +0200
+++ giac-1.2.3/doc/fr/Makefile.am 2017-02-09 17:16:22.176661424 +0100
@@ -13,7 +13,7 @@
HTML_DIRS_LOCAL = casrouge castor cascmd_fr casgeo cassim tutoriel \
casinter casexo cascas
-HTML_STAMPS = casrouge.stamp castor.stamp cascmd_fr.stamp casgeo.stamp \
+HTML_STAMPS = algo.stamp casrouge.stamp castor.stamp cascmd_fr.stamp casgeo.stamp \
cassim.stamp tutoriel.stamp casinter.stamp casexo.stamp \
cascas.stamp
@@ -32,6 +32,14 @@
thelangdocdir = $(docdir)/$(the_LANG)
dist_thelangdoc_DATA = html_mall html_mtt html_vall xcasmenu xcasex keywords
+giacfr.tex: ../giacfr.tex
+ cp "$<" "$@"
+
+# install xvfb-run and set this to "xvfb-run" to run "headless" (without a real display)
+XVFB_RUN =
+algo.pdf: algo.tex giacfr.tex ../../src/icas
+ $(XVFB_RUN) ../../src/icas "$<"
+
html-local: $(HTML_STAMPS)
pdf-local: $(PDF_LOCAL)
dvi-local: $(DVI_LOCAL)
@@ -47,7 +55,9 @@
$(srcdir)/casexo: casexo.stamp
$(srcdir)/cascas: cascas.stamp
-install-data-local: $(HTML_STAMPS) $(PDF_LOCAL)
+all-local: $(PDF_LOCAL) $(HTML_STAMPS)
+
+install-data-local:
$(install_sh) -d $(DESTDIR)$(prefix)/share/giac/doc/$(the_LANG)
$(INSTALL_DATA) $(PDF_LOCAL) $(DESTDIR)$(prefix)/share/giac/doc/$(the_LANG)
# $(INSTALL_DATA) $(PS_LOCAL) $(DESTDIR)$(prefix)/share/giac/doc/$(the_LANG)
diff -ru giac-1.2.3-orig/src/icas.cc giac-1.2.3/src/icas.cc
--- giac-1.2.3-orig/src/icas.cc 2016-12-19 17:32:08.000000000 +0100
+++ giac-1.2.3/src/icas.cc 2017-02-09 17:12:14.167621141 +0100
@@ -494,10 +494,8 @@
if (pos>=0 && pos<ss){
out << s << endl;
out.close();
- COUT << "File " << outfile << " created, now running hevea in background and pgiac " << outfile << endl << "Then I will run pdflatex " << giac::remove_extension(outfile) << endl << "For HTML5 output, you can run\nhevea -fix " << infile_ << endl;
- std::string cmd="hevea -fix "+infile_+" &";
- system(cmd.c_str());
- cmd="makeindex "+giac::remove_extension(outfile);
+ COUT << "File " << outfile << " created, now running pgiac " << outfile << endl << "Then I will run pdflatex " << giac::remove_extension(outfile) << endl << "For HTML5 output, you can run\nhevea -fix " << infile_ << endl;
+ std::string cmd="makeindex "+giac::remove_extension(outfile);
system(cmd.c_str());
cmd=("pdflatex "+giac::remove_extension(outfile)+" && mv "+giac::remove_extension(outfile)+".pdf "+infile_+".pdf");
COUT << cmd << endl;
@@ -705,10 +703,8 @@
if (pos>=0 && pos<ss){
out << s << endl;
out.close();
- COUT << "File " << outfile << " created, now running hevea in background and pgiac " << outfile << endl << "Then I will run pdflatex " << giac::remove_extension(outfile) << endl << "For HTML5 output, you can run\nhevea -fix " << giac::remove_extension(infile) << endl;
- std::string cmd="hevea -fix "+giac::remove_extension(infile)+" &";
- system(cmd.c_str());
- cmd=("pgiac "+outfile+" && pdflatex "+giac::remove_extension(outfile)+" && mv "+giac::remove_extension(outfile)+".pdf "+giac::remove_extension(infile)+".pdf");
+ COUT << "File " << outfile << " created, now running pgiac " << outfile << endl << "Then I will run pdflatex " << giac::remove_extension(outfile) << endl << "For HTML5 output, you can run\nhevea -fix " << giac::remove_extension(infile) << endl;
+ std::string cmd=("pgiac "+outfile+" && pdflatex "+giac::remove_extension(outfile)+" && mv "+giac::remove_extension(outfile)+".pdf "+giac::remove_extension(infile)+".pdf");
COUT << cmd << endl;
system(cmd.c_str());
return;