--- a/w3mimg/Makefile.in
+++ b/w3mimg/Makefile.in
@@ -22,6 +22,8 @@
 	$(AR) rv $@ $(IMGOBJS)
 	$(RANLIB) $@
 
+$(IMGOBJS): @IMGTARGETS@
+
 w3mimg.o: w3mimg.c
 	$(CC) $(CFLAGS) -c $<
 
--- a/Makefile.in
+++ b/Makefile.in
@@ -250,7 +250,7 @@
 	 (cd $$subdir && $(MAKE) install); \
 	done
 
-all-scripts:
+all-scripts: funcname.tab
 	for dir in $(SCRIPTSUBDIRS);	\
 	do	\
 		(cd $$dir && $(MAKE) $(MAKE_ARGS)); \
