-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-AUTOMAKE_OPTIONS = gnits
-
-noinst_LIBRARIES = libtar.a
-
-EXTRA_DIST = \
-alloca.c fileblocks.c fnmatch.c ftruncate.c execlp.c gmalloc.c \
-memset.c mkdir.c modechange.h rename.c rmdir.c stpcpy.c strstr.c
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+noinst_LIBRARIES=libtar.a
+rmt-command.h : Makefile
+ $(AM_V_GEN)rm -f $@-t $@
+ $(AM_V_at)echo "#ifndef DEFAULT_RMT_COMMAND" >> $@-t
+ $(AM_V_at)echo "# define DEFAULT_RMT_COMMAND \"$(DEFAULT_RMT_DIR)/`echo rmt | sed '$(transform)'`$(EXEEXT)\"" >> $@-t
+ $(AM_V_at)echo "#endif" >> $@-t
+ $(AM_V_at)mv $@-t $@
+BUILT_SOURCES = rmt-command.h
+CLEANFILES = rmt-command.h rmt-command.h-t
+AM_CPPFLAGS = -I$(top_srcdir)/gnu -I../ -I../gnu
+AM_CFLAGS = $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)