Makefile.am 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. AUTOMAKE_OPTIONS=foreign subdir-objects
  2. ACLOCAL_AMFLAGS=-I m4
  3. EXTRA_DIST=
  4. CLEANFILES =
  5. modulesdir = $(pkgdatadir)/Parsetexi
  6. xsdir = $(pkglibdir)
  7. PERL_INC = $(PERL_CONF_archlibexp)/CORE
  8. XSUBPPARGS = -typemap $(PERL_CONF_privlibexp)/ExtUtils/typemap
  9. .xs.c:
  10. $(XSUBPP) $(XSUBPPARGS) $< > $*.xsc && mv $*.xsc $*.c
  11. bin_PROGRAMS=parsetexi
  12. xs_LTLIBRARIES = Parsetexi.la
  13. CLEANFILES += Parsetexi.c
  14. EXTRA_DIST += Parsetexi.xs
  15. # Override these variables set by configure at the top level, because
  16. # the compiler used in this subdirectory might be different.
  17. # PERL_EXT_var are user variables, allowing configuring at the top-level
  18. # with e.g. "./configure CFLAGS='-g -O0' PERL_EXT_CFLAGS='-g'".
  19. CFLAGS = $(PERL_EXT_CFLAGS)
  20. CPPFLAGS = $(PERL_EXT_CPPFLAGS)
  21. LDFLAGS = $(PERL_EXT_LDFLAGS)
  22. AM_CFLAGS = $(PERL_CONF_ccflags)
  23. Parsetexi_la_CFLAGS = $(AM_CFLAGS)
  24. Parsetexi_la_CFLAGS += -DVERSION=\"$(VERSION)\" "-I$(PERL_INC)"
  25. AM_LDFLAGS = -no-undefined -L$(PERL_INC) $(PERL_CONF_libperl)
  26. AM_LDFLAGS += -avoid-version -module $(PERL_CONF_ccdlflags)
  27. # The -no-undefined flag is for MS-Windows. See info node
  28. # `(gnulib)Libtool and Windows'. The -L and -l options after it show
  29. # where to find the undefined symbols.
  30. Parsetexi_la_SOURCES= Parsetexi.c \
  31. api.c api.h \
  32. parser.c parser.h tree_types.h \
  33. element_types.c element_types.h \
  34. commands.c commands.h \
  35. command_ids.h \
  36. input.c input.h \
  37. tree.c tree.h close.c \
  38. text.c text.h \
  39. context_stack.c context_stack.h \
  40. debug.c \
  41. convert.c convert.h \
  42. end_line.c \
  43. separator.c \
  44. multitable.c \
  45. indices.c \
  46. macro.c macro.h \
  47. handle_commands.c handle_commands.h \
  48. def.c def.h \
  49. dump_perl.c dump_perl.h \
  50. extra.c \
  51. menus.c \
  52. labels.c \
  53. errors.c errors.h \
  54. counter.c counter.h
  55. parsetexi_SOURCES=$(Parsetexi_la_SOURCES) main.c
  56. parsetexi_CFLAGS = -DVERSION=\"$(VERSION)\" "-I$(PERL_INC)"
  57. # TODO: should -lpthread come from the Perl conf?
  58. parsetexi_LDFLAGS = $(AM_LDFLAGS) -lpthread
  59. BUILT_SOURCES=element_types.c element_types.h \
  60. command_data.c command_ids.h
  61. # Need to be distributed
  62. EXTRA_DIST+=element_types.txt element_types.awk \
  63. command_data.txt command_data.awk
  64. # For reference
  65. EXTRA_DIST+=Common.pm Parser-5556.pm
  66. EXTRA_DIST+=complete_tree.pl
  67. # Notes
  68. EXTRA_DIST+=debug_perl.txt makeinfo-debug.txt
  69. element_types.c element_types.h: element_types.txt element_types.awk
  70. awk -f element_types.awk element_types.txt >element_types.h
  71. command_data.c command_ids.h: command_data.txt command_data.awk
  72. awk -f command_data.awk command_data.txt >command_ids.h