Don't include Makefile.inc: add specific rule here (portability).
[gedcom-parse.git] / gedcom / Makefile.am
index 9bd55c15051920888781e6f3dd64e8cb806f5994..aa33f87832862d291a379278f5998e295e1c3982 100644 (file)
@@ -25,8 +25,9 @@ libgedcom_la_SOURCES = lex.gedcom_1byte_.c \
                       date.c \
                       hash.c \
                       xref.c \
+                      age.c \
                       compat.c
-libgedcom_la_LDFLAGS = -version-info $(LIBVERSION)
+libgedcom_la_LDFLAGS = -export-dynamic -version-info $(LIBVERSION) $(LIBICONV)
 libgedcom_la_LIBADD  = calendar/libcalendar.la
 BUILT_SOURCES = lex.gedcom_1byte_.c \
                lex.gedcom_hilo_.c \
@@ -45,6 +46,7 @@ noinst_HEADERS = encoding.h \
                 date.h \
                 hash.h \
                 xref.h \
+                age.h \
                 compat.h
 EXTRA_DIST = gedcom.y \
             gedcom_date.y \
@@ -54,8 +56,6 @@ EXTRA_DIST = gedcom.y \
             gedcom_date.lex \
             gedcom_lex_common.c
 
-include $(top_srcdir)/Makefile.inc
-
 gedcom.tab.c gedcom.tab.h:     gedcom.y
        $(YACC) $(YFLAGS) --name-prefix=gedcom_ $<
 
@@ -98,3 +98,14 @@ 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