Bugfix.
[gedcom-parse.git] / gedcom / Makefile.am
index 9c88264f404f6634139767758b26f1329339a300..025ee80d523ac87205568390f227878b8bc8d3c8 100644 (file)
@@ -9,7 +9,7 @@ INCLUDES = -I $(srcdir)/../intl -I $(srcdir)/../include -I $(srcdir)/calendar \
            -DPKGDATADIR=\"$(pkgdatadir)\" -DLOCALEDIR=\"$(localedir)\"
 YFLAGS   = --debug --defines
 LFLAGS   = -8
-CFLAGS   = -g -O2 -W -Wall -pedantic -Wno-long-long
+CFLAGS   = -g -O2 -W -Wall -pedantic -Wno-long-long @EXTRA_CFLAGS@
 
 lib_LTLIBRARIES = libgedcom.la
 libgedcom_la_SOURCES = lex.gedcom_1byte_.c \
@@ -54,7 +54,10 @@ EXTRA_DIST = gedcom.y \
             gedcom_hilo.lex \
             gedcom_lohi.lex \
             gedcom_date.lex \
-            gedcom_lex_common.c
+            gedcom_lex_common.c \
+            $(BUILT_SOURCES)
+
+include $(top_srcdir)/Makefile.inc
 
 gedcom.tab.c gedcom.tab.h:     gedcom.y
        $(YACC) $(YFLAGS) --name-prefix=gedcom_ $<
@@ -98,14 +101,3 @@ lex.gedcom_lohi_.test.o:    lex.gedcom_lohi_.c
 
 clean-local:
        rm -f $(EXTRA_PROGRAMS)
-
-%.tabgen.h:    %.tab.h
-       if [ ! -r $(srcdir)/$@ ] ; \
-       then \
-         touch $(srcdir)/$@; \
-       fi
-       if ! diff -q $< $(srcdir)/$@ > /dev/null; \
-       then \
-         rm $(srcdir)/$@; \
-         cp $(srcdir)/$< $(srcdir)/$@; \
-       fi