From 8d8179d3b412cdd2c1af60539b9aec89631f3fe6 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Wed, 8 Oct 2025 22:54:47 +0200 Subject: Allow building thumbnail from the top-level build --- configure | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'configure') diff --git a/configure b/configure index cc9e0dc..1efa5cf 100755 --- a/configure +++ b/configure @@ -14,12 +14,15 @@ CFLAGS=${CFLAGS:-"$default_CFLAGS $default_NPCFLAGS"} LDFLAGS=${LDFLAGS:-$default_LDFLAGS} USERGEN_LDFLAGS=${LDFLAGS} +build_thumbnail=0 + help() { cat <<-EOF $0 [OPTION ...] --prefix Set installation directory [$default_prefix] +--thumbnail Build thumbnail generator Some influential environment variables: CC C compiler [$default_CC] @@ -43,6 +46,7 @@ while true; do case "$key" in --prefix ) prefix="$value"; shift; test $split_arg -eq 0 && shift ;; + --thumbnail ) build_thumbnail=1; shift ;; -h | --help ) help; exit 0 ;; * ) test "$1" != "" && help && exit 1 || break ;; esac @@ -180,6 +184,16 @@ $(FDZIPSTREAM): FORCE $(DYNSTR) EOF fi +if [ $build_thumbnail -ne 0 ] +then +cat <<"EOF" >> $F +THUMBNAIL = thumbnail/thumbnail +thumbnail $(PROJECT): $(THUMBNAIL) +$(THUMBNAIL): FORCE + +cd thumbnail && $(MAKE) CC=$(CC) +EOF +fi + cat <<"EOF" >> $F clean: rm -f $(OBJECTS) $(DEPS) @@ -228,6 +242,13 @@ cat <<"EOF" >> $F EOF fi +if [ $build_thumbnail -ne 0 ] +then +cat <<"EOF" >> $F + +cd thumbnail && $(MAKE) distclean +EOF +fi + cat <<"EOF" >> $F -include $(DEPS) EOF -- cgit v1.2.3