]> git.draconx.ca Git - slotifier.git/blobdiff - Makefile.am
Use option generator script from dxcommon.
[slotifier.git] / Makefile.am
index 95157235c33775e9e2484c4bc560824892847765..891cc7543544eed22185a03bd16b9a9dca2be0f5 100644 (file)
@@ -11,7 +11,8 @@ DISTCLEANFILES =
 MOSTLYCLEANFILES =
 MAINTAINERCLEANFILES =
 EXTRA_LIBRARIES =
-EXTRA_DIST = INSTALL README.md
+EXTRA_DIST = bootstrap common/scripts/fix-gnulib.pl m4/gnulib-cache.m4 \
+             INSTALL README.md
 
 AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib \
               -DLOCALEDIR=\"$(localedir)\"
@@ -19,10 +20,11 @@ AM_CFLAGS = $(LIBGERBV_CFLAGS) $(CNEARTREE_CFLAGS)
 
 bin_PROGRAMS = slotifier
 
-slotifier_SOURCES = src/slotifier.c
+slotifier_SOURCES = src/slotifier.c src/options.h
 slotifier_LDADD = $(LIBGERBV_LIBS) $(CNEARTREE_LIBS) libgnu.a \
                   $(LTLIBICONV) $(LTLIBINTL) $(HYPOT_LIBM)
 $(slotifier_OBJECTS): $(gnulib_headers)
+$(slotifier_OBJECTS): src/options.h
 
 dist_man_MANS = doc/slotifier.1
 
@@ -77,6 +79,14 @@ distcheck-hook:
              echo '       *** Remember to update NEWS before preparing a release.'; \
              $(TEST_DISTRIBUTION_OR_ERROR); } >&2
 
+OPTFILES = src/options.opt
+.opt.h:
+       $(AM_V_GEN) $(AWK) -f $(DX_BASEDIR)/scripts/gen-options.awk $< >$@.tmp
+       $(AM_V_at) mv -f $@.tmp $@
+$(OPTFILES:.opt=.h): $(DX_BASEDIR)/scripts/gen-options.awk
+MAINTAINERCLEANFILES += $(OPTFILES:.opt=.h)
+EXTRA_DIST += $(DX_BASEDIR)/scripts/gen-options.awk $(OPTFILES)
+
 # Supporting rules for gettext.
 include $(top_srcdir)/common/snippet/gettext.mk
 noinst_DATA = $(MOFILES)