aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-make/ctx.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2019-02-25 22:43:51 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2020-01-12 12:37:11 +0100
commit7870e88f0653e6ac93c1f2e123aa9826778be376 (patch)
tree98d9c0840bf809ab5be36539680d0997762f3bb4 /src/blogc-make/ctx.c
parenta45e7255cb89d76c4836e1cac073c2f941529e70 (diff)
downloadblogc-feature/sass.tar.gz
blogc-feature/sass.tar.bz2
blogc-feature/sass.zip
make: implemented optional sass support using libsassfeature/sass
pending: - tests for sass support - build tests on ci with and without libsass - documentation - support sass options in blogcfile
Diffstat (limited to 'src/blogc-make/ctx.c')
-rw-r--r--src/blogc-make/ctx.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/blogc-make/ctx.c b/src/blogc-make/ctx.c
index 423b334..408b6f2 100644
--- a/src/blogc-make/ctx.c
+++ b/src/blogc-make/ctx.c
@@ -6,6 +6,10 @@
* See the file LICENSE.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif /* HAVE_CONFIG_H */
+
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
@@ -192,6 +196,16 @@ bm_ctx_new(bm_ctx_t *base, const char *settings_file, const char *argv0,
}
free(content);
+#ifndef USE_LIBSASS
+ if (settings->sass != NULL) {
+ *err = bc_error_new_printf(BLOGC_MAKE_ERROR_SETTINGS,
+ "[sass] section found in %s, but blogc-make was built without "
+ "libsass support", settings_file);
+ bm_settings_free(settings);
+ return NULL;
+ }
+#endif
+
const char *template_dir = bc_trie_lookup(settings->settings, "template_dir");
if (template_dir == NULL)
template_dir = "";