aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure17
1 files changed, 14 insertions, 3 deletions
diff --git a/configure b/configure
index 4f42953..35a0743 100755
--- a/configure
+++ b/configure
@@ -177,7 +177,7 @@ EOF
if [ $build_thumbnail -ne 0 ]
then
cat <<"EOF" >> $F
- +cd thumbnail && $(MAKE) PREFIX=$(PREFIX) install
+ +test -f $(THUMBNAIL_MK) && cd thumbnail && $(MAKE) install || :
EOF
fi
@@ -218,9 +218,13 @@ if [ $build_thumbnail -ne 0 ]
then
cat <<"EOF" >> $F
THUMBNAIL = thumbnail/thumbnail
+THUMBNAIL_MK = thumbnail/Makefile
thumbnail $(PROJECT): $(THUMBNAIL)
-$(THUMBNAIL): FORCE
+$(THUMBNAIL_MK):
+ cd thumbnail && CFLAGS="$(CFLAGS)" ./configure --prefix=$(PREFIX)
+$(THUMBNAIL): $(THUMBNAIL_MK) FORCE
+cd thumbnail && $(MAKE) CC=$(CC)
+all: $(THUMBNAIL)
EOF
fi
@@ -250,6 +254,13 @@ cat <<"EOF" >> $F
EOF
fi
+if [ $build_thumbnail -ne 0 ]
+then
+cat <<"EOF" >> $F
+ +test -f $(THUMBNAIL_MK) && cd thumbnail && $(MAKE) clean || :
+EOF
+fi
+
cat <<"EOF" >> $F
distclean: clean
rm -f slcl usergen
@@ -275,7 +286,7 @@ fi
if [ $build_thumbnail -ne 0 ]
then
cat <<"EOF" >> $F
- +cd thumbnail && $(MAKE) distclean
+ +test -f $(THUMBNAIL_MK) && cd thumbnail && $(MAKE) distclean || :
EOF
fi