From 8065c043f41e47583e09c7a908ed8a50bde44d61 Mon Sep 17 00:00:00 2001
From: Mariano Montone <marianomontone@gmail.com>
Date: Tue, 15 May 2018 11:00:26 -0300
Subject: [PATCH] Build adjustments

---
 .gitignore | 3 ++-
 Makefile   | 5 ++---
 build.lisp | 3 ++-
 main.lisp  | 7 ++++---
 4 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/.gitignore b/.gitignore
index c140213..aa116bc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,4 +6,5 @@ auto-save-list
 .\#*
 
 # Output files
-output/
\ No newline at end of file
+output/
+system-index.txt
diff --git a/Makefile b/Makefile
index c714b0d..b2e75f3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,13 @@
-all: generate
+all: build
 
 serve:
-	#cd output; python -m SimpleHTTPServer
 	cd output; python ../server.py
 
 static:
 	mkdir -p output/static
 	cp -rf content/static/* output/static
 
-generate: static
+build: static
 	sbcl --load build.lisp --non-interactive
 
 clean:
diff --git a/build.lisp b/build.lisp
index cda5f52..ddbd8d9 100644
--- a/build.lisp
+++ b/build.lisp
@@ -1,2 +1,3 @@
+(push (uiop:getcwd) quicklisp:*local-project-directories*)
 (ql:quickload :cl-site)
-(funcall (symbol-function (intern "MAKE-SITE" :cl-site)))
+(funcall (symbol-function (intern "MAKE-SITE" :cl-site)) (merge-pathnames "output/" (uiop:getcwd)))
diff --git a/main.lisp b/main.lisp
index a6af33d..7e8ab0b 100644
--- a/main.lisp
+++ b/main.lisp
@@ -1,8 +1,9 @@
 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
 (in-package :cl-site)
 
-(defun make-site () 
-  (progn 
+(defun make-site (&optional output-dir) 
+  (let ((*output-dir* (or output-dir *output-dir*)))
+    (format t "Generating site in ~A.~%" *output-dir*)
     (process-static)
     (process-styles)
-    (process-pages)))
\ No newline at end of file
+    (process-pages)))
-- 
GitLab