Commit Diff


commit - 4c63d3a5b747a6acb4786af9c9e24d422feff00b
commit + 9efb7226be6de6927ff8e03da3c82cd71cf960df
blob - 814e2b63d1f4af6a1817a3a27301368e080cb4b1
blob + 0b1f4fd498d8e9790799c6cec645ec55b420fc5e
--- gotwebd/Makefile.am
+++ gotwebd/Makefile.am
@@ -4,10 +4,13 @@ include $(top_builddir)/Makefile.common
 
 # /home/n6tadam/projects/got/gotwebd/../template/template -o pages.c pages.tmpl
 
-SUFFIXES: .tmpl
-.tmpl.c:
-	$(top_srcdir)/template/template -o pages.c pages.tmpl
+BUILT_SOURCES = pages.c
+CLEANFILES = pages.c parse.c
 
+pages.c: $(top_srcdir)/gotwebd/pages.tmpl
+	${MAKE} -C $(top_builddir)/template
+	$(top_builddir)/template/template -o pages.c $(top_srcdir)/gotwebd/pages.tmpl
+
 gotwebd_SOURCES = config.c \
 		  $(top_srcdir)/lib/blame.c \
 		  $(top_srcdir)/lib/bloom.c \
@@ -63,7 +66,7 @@ gotwebd_SOURCES = config.c \
 		  gotweb.c \
 		  gotwebd.c \
 		  log.c \
-		  pages.tmpl \
+		  pages.c \
 		  parse.y \
 		  proc.c \
 		  sockets.c
@@ -75,6 +78,7 @@ endif
 
 gotwebd_DEPENDENCIES = $(top_builddir)/compat/libopenbsd-compat.a
 EXTRA_DIST = $(top_srcdir)/gotwebd/*.h \
+	     $(top_srcdir)/gotwebd/*.tmpl \
 	     $(top_srcdir)/template/tmpl.h \
 	     gotwebd.8 gotwebd.conf.5
 
blob - d301c7c41d8d692c1af309d7e273f275871d7eea
blob + b0756b650ba10f35b64801c17c036af0a82accb9
--- gotwebd/parse.y
+++ gotwebd/parse.y
@@ -49,6 +49,7 @@
 #include "proc.h"
 #include "gotwebd.h"
 #include "got_sockaddr.h"
+#include "got_compat.h"
 
 TAILQ_HEAD(files, file)		 files = TAILQ_HEAD_INITIALIZER(files);
 static struct file {