# $Id$
+include $(top_srcdir)/Makefile-head.am
+
AUTOMAKE_OPTIONS = dist-tarZ
+SUBDIRS = macros intl . po
+## to automatically rebuild aclocal.m4 if any of the macros in
+## `macros/' change
+@MAINT@include macros/macros.dep
+@MAINT@macros/macros.dep: macros/Makefile.am
+@MAINT@ cd macros && $(MAKE) macros.dep
-EXTRA_DIST = autogen.sh mdsms.1.in ChangeLog
+EXTRA_DIST += autogen.pl mdsms.1.c mdsms.1.in ChangeLog ABOUT-NLS mdsms.spec.in INSTALL mkinstalldirs
-CLEANFILES = ChangeLog
+CLEANFILES += mdsms.1 mdsms.1.in2
-bin_PROGRAMS = mdsms
+bin_PROGRAMS += mdsms
man_MANS = mdsms.1
-noinst_PROGRAMS = manfmt mdsms.1
-noinst_HEADERS = setup.h getopt.h
+noinst_PROGRAMS = manfmt
+noinst_SCRIPTS = mdsms.1 mdsms.1.in2
+noinst_HEADERS += setup.h getopt.h
manfmt_SOURCES = manfmt.c
mdsms_SOURCES = mdsms.c
-mdsms_LDADD = @LIBOBJS@
+mdsms_LDADD = $(LIBOBJS) $(INTLLIBS)
+
+mdsms.1.in2: mdsms.1.in
+ grep -v Id: > mdsms.1.in2 mdsms.1.in
-mdsms.1.o: mdsms.1.c mdsms.1.in config.h setup.h
+mdsms.1.o: mdsms.1.c mdsms.1.in2 config.h setup.h
$(CPP) > mdsms.1.o mdsms.1.c
mdsms.1: manfmt mdsms.1.o
./manfmt > mdsms.1 < mdsms.1.o
-.PHONY: ChangeLog
+MAINTAINERCLEANFILES+= \
+ ChangeLog
+
+CLEANFILES+= \
+ ChangeLog.bak
+if MAINTAINER_MODE
ChangeLog:
- rcs2log >ChangeLog
+ cvs2cl --usermap cvs2cl-usermap --window 3600 --separate-header --no-wrap --file $@ . $(REACTOS_SOURCES)
+
+else
+ChangeLog:
+ touch $@
+
+endif