--- orig/WPrefs.app/xpm/Makefile.in
+++ mod/WPrefs.app/xpm/Makefile.in
@@ -93,7 +93,7 @@
 
 xpmdatadir = $(wprefsdir)/xpm
 
-xpmdata_DATA =  	advancetonewworkspace.xpm 	animations.xpm 	appearance.xpm 	clip.xpm 	configs.xpm 	cycleworkspaces.xpm 	dock.xpm 	dontlinkworkspaces.xpm 	ergonomic.xpm 	ergowood.xpm 	expert.xpm 	fonts.xpm 	iconprefs.xpm 	keyboard.xpm 	keyboardprefs.xpm 	keyshortcuts.xpm 	menualign1.xpm 	menualign2.xpm 	menuprefs.xpm 	menus.xpm 	minimouseleft.xpm 	minimousemiddle.xpm 	minimouseright.xpm 	miscprefs2.xpm 	moreanim.xpm 	mousesettings.xpm 	mousespeed.xpm 	newstyle.xpm 	nonopaque.xpm 	oldstyle.xpm 	opaque.xpm 	paths.xpm 	smooth.xpm 	sound.xpm 	speed0.xpm 	speed0s.xpm 	speed1.xpm 	speed1s.xpm 	speed2.xpm 	speed2s.xpm 	speed3.xpm 	speed3s.xpm 	speed4.xpm 	speed4s.xpm 	temp.xpm 	theme.xpm 	timer0.xpm 	timer0s.xpm 	timer1.xpm 	timer1s.xpm 	timer2.xpm 	timer2s.xpm 	timer3.xpm 	timer3s.xpm 	timer4.xpm 	timer4s.xpm 	timer5.xpm 	timer5s.xpm 	whandling.xpm 	windowfocus.xpm 	workspace.xpm 	xis.xpm 
+xpmdata_DATA =  	advancetonewworkspace.xpm 	animations.xpm 	appearance.xpm 	clip.xpm 	configs.xpm 	cycleworkspaces.xpm 	dock.xpm 	dontlinkworkspaces.xpm 	ergonomic.xpm 	ergowood.xpm 	expert.xpm 	fonts.xpm 	iconprefs.xpm 	keyboard.xpm 	keyboardprefs.xpm 	keyshortcuts.xpm 	menualign1.xpm 	menualign2.xpm 	menuprefs.xpm 	menus.xpm 	minimouseleft.xpm 	minimousemiddle.xpm 	minimouseright.xpm 	miscprefs2.xpm 	moreanim.xpm 	mousesettings.xpm 	mousespeed.xpm 	newstyle.xpm 	nonopaque.xpm 	oldstyle.xpm 	opaque.xpm 	paths.xpm 	smooth.xpm 	sound.xpm 	speed0.xpm 	speed0s.xpm 	speed1.xpm 	speed1s.xpm 	speed2.xpm 	speed2s.xpm 	speed3.xpm 	speed3s.xpm 	speed4.xpm 	speed4s.xpm 	tdel.xpm 	tedit.xpm 	temp.xpm 	textr.xpm 	theme.xpm 	timer0.xpm 	timer0s.xpm 	timer1.xpm 	timer1s.xpm 	timer2.xpm 	timer2s.xpm 	timer3.xpm 	timer3s.xpm 	timer4.xpm 	timer4s.xpm 	timer5.xpm 	timer5s.xpm 	tnew.xpm 	whandling.xpm 	windowfocus.xpm 	workspace.xpm 	xis.xpm 
 
 
 EXTRA_DIST = $(xpmdata_DATA)
@@ -112,9 +112,9 @@
 all: all-redirect
 .SUFFIXES:
 $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
-	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WPrefs.app/xpm/Makefile
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu WPrefs.app/xpm/Makefile
 
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
 	cd $(top_builddir) \
 	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
@@ -146,6 +146,11 @@
 subdir = WPrefs.app/xpm
 
 distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WPrefs.app/xpm/Makefile
 	@for file in $(DISTFILES); do \
 	  d=$(srcdir); \
 	  if test -d $$d/$$file; then \
