ladybird/Ports/dash/patches/0002-Skip-building-helpers-by-default.patch

38 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Gunnar Beutner <gbeutner@serenityos.org>
Date: Mon, 12 Apr 2021 09:18:56 +0200
Subject: [PATCH] Skip building helpers by default
---
configure.ac | 3 +++
src/Makefile.am | 2 ++
2 files changed, 5 insertions(+)
diff --git a/configure.ac b/configure.ac
index 4829288..9f9a155 100644
--- a/configure.ac
+++ b/configure.ac
@@ -181,5 +181,8 @@ AC_ARG_ENABLE(lineno, AS_HELP_STRING(--disable-lineno, \
if test "$enable_lineno" != "no"; then
AC_DEFINE([WITH_LINENO], 1, [Define if you build with -DWITH_LINENO])
fi
+AC_ARG_ENABLE(helpers, AS_HELP_STRING(--enable-helpers, \
+ [Build helpers]))
+AM_CONDITIONAL([BUILD_HELPERS], [test x$enable_helpers = xyes])
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index 139355e..e95491a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -66,7 +66,9 @@ syntax.c syntax.h: mksyntax
signames.c: mksignames
./$^
+if BUILD_HELPERS
mksyntax: token.h
$(HELPERS): %: %.c
$(COMPILE_FOR_BUILD) -o $@ $<
+endif