Description: Add missing build rules
 Upstream bundles them, we exclude them via Files-Excluded but then need to build them
Author: Ximin Luo <infinity0@debian.org>
Forwarded: TODO
---
This patch header follows DEP-3: https://dep.debian.net/deps/dep3/
--- giac.orig/doc/Makefile.am
+++ giac/doc/Makefile.am
@@ -7,7 +7,7 @@
 dist_doc_DATA = README index.html
 
 
-install-exec-hook: 
+install-exec-hook: testfr.html algoseconde.html
 	$(install_sh) -d $(DESTDIR)$(prefix)/share/giac/doc/dxcas
 	$(install_sh) -d $(DESTDIR)$(prefix)/share/giac/doc/pari
 	for dd in $(XCASHTML); do \
@@ -24,3 +24,9 @@
 #	ln -sf $(DESTDIR)$(prefix)/share/giac/doc/en/xcasex $(DESTDIR)$(prefix)/share/giac/doc/local/xcasex
 #	ln -sf $(DESTDIR)$(prefix)/share/giac/doc/en/xcasmenu $(DESTDIR)$(prefix)/share/giac/doc/local/xcasmenu
 
+testfr.html:
+	hevea -fix testfr
+
+algoseconde.html:
+#	hevea -fix algoseconde
+	echo '<p>Unfortunately, this file <a href="https://xcas.univ-grenoble-alpes.fr/forum/viewtopic.php?f=4&t=1813">cannot yet be built</a> in Debian. See <a href="https://www-fourier.ujf-grenoble.fr/~parisse/algoseconde.html">here</a> for an on-line version, though it may be for a newer version than what'\''s installed in this package.</p>' > "$@"
--- giac.orig/src/Makefile.am
+++ giac/src/Makefile.am
@@ -1,3 +1,4 @@
+BUILT_SOURCES = input_parser.h input_parser.cc input_parser.hh lexer.h
 lib_LTLIBRARIES = libgiac.la
 libgiac_la_SOURCES = input_lexer.ll sym2poly.cc gausspol.cc threaded.cc \
   moyal.cc maple.cc ti89.cc mathml.cc\
@@ -9,8 +10,8 @@
   pari.cc cocoa.cc unary.cc usual.cc identificateur.cc gen.cc tinymt32.cc first.cc \
   TmpLESystemSolver.C TmpFGLM.C \
   TmpFGLM.H TmpLESystemSolver.H \
-  path.h lexer.h \
-  input_lexer.h input_parser.h threaded.h vector.h \
+  path.h \
+  input_lexer.h threaded.h vector.h \
   help.cc  lpsolve.cc optimization.cc signalprocessing.cc \
   graphe.cc graphtheory.cc nautywrapper.c markup.cc kdisplay.cc kadd.cc # Ugh..
 
@@ -107,3 +108,10 @@
 	cp -f input_lexer.h $(DESTDIR)$(includedir)/giac
 	cp -f input_parser.h $(DESTDIR)$(includedir)/giac
 
+input_parser.cc: input_parser.yy
+	bison -y $(AM_YFLAGS) "$<" -o "$@"
+
+input_parser.h: input_parser.hh
+	cp "$<" "$@"
+
+lexer.h: input_lexer.cc
