Skip HTML generation if groff HTML driver isn't present
[geda-gaf.git] / gaf / Makefile.am
blob248713ce9d9f06fb18de8ea060d6402b470b035c
1 SUBDIRS = po
3 bin_PROGRAMS = gaf
5 EXTRA_DIST = $(html_man_files) gaf.1.in ChangeLog
7 if HAVE_GIT_REPO
8 ChangeLog: $(top_builddir)/stamp-git
9         ( \
10           cd $(srcdir) && \
11           $(GIT) log --pretty=medium $(CHANGELOG_BASE).. -- . || \
12           echo "WARNING: ChangeLog information not available from git" >&2 ; \
13         ) > $@
14 endif HAVE_GIT_REPO
16 BUILT_SOURCES = shell.x
18 gaf_SOURCES = \
19         builtins.h \
20         gettext.h \
21         gaf.c \
22         config.c \
23         export.c \
24         shell.c
26 gaf_CPPFLAGS = \
27         -I$(top_srcdir) -I$(top_srcdir)/libgeda/include -I$(includedir)
28 gaf_CFLAGS = \
29         $(GCC_CFLAGS) $(MINGW_CFLAGS) $(GUILE_CFLAGS) $(GTK_CFLAGS) \
30         $(GDK_PIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(CAIRO_PNG_CFLAGS) \
31         $(CAIRO_PDF_CLAGS) $(CAIRO_PS_CFLAGS) $(CAIRO_SVG_CFLAGS)
32 gaf_LDFLAGS = $(GUILE_LIBS) $(GTK_LIBS) $(GDK_PIXBUF_LIBS) $(CAIRO_LIBS) \
33         $(CAIRO_PNG_LIBS) $(CAIRO_PDF_CLAGS) $(CAIRO_PS_LIBS) $(CAIRO_SVG_LIBS)
34 gaf_LDADD = \
35         $(top_builddir)/libgedacairo/libgedacairo.la \
36         $(top_builddir)/libgeda/src/libgeda.la
38 localedir = @datadir@/locale
39 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
41 # This is used to generate boilerplate for defining Scheme functions
42 # in C.
43 snarf_cpp_opts = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
44         $(gaf_CPPFLAGS) $(AM_CFLAGS) $(gaf_CFLAGS) $(CPPFLAGS)
45 AM_V_SNARF = $(am__v_SNARF_@AM_V@)
46 am__v_SNARF_ = $(am__v_SNARF_@AM_DEFAULT_V@)
47 am__v_SNARF_0 = @echo "  SNARF   " $@;
48 am__v_SNARF_1 =
49 .c.x:
50         $(AM_V_SNARF)CPP="$(CPP)" $(GUILE_SNARF) -o $@ $< $(snarf_cpp_opts)
52 .1.in.1:
53         $(AM_V_GEN)\
54         d=`$(GUILE) -c '(setlocale LC_ALL "C") \
55           (display (strftime "%B %-d, %Y" \
56           (car (strptime "%Y%m%d" (cadr (program-arguments))))))' $(DATE_VERSION)` ; \
57         v="$(DOTTED_VERSION).$(DATE_VERSION)" ; \
58         y=`echo $(DATE_VERSION)| sed -e"s/\(....\).*/\1/"`; \
59         sed -e"s:[@]DATE@:$$d:" -e"s:[@]VERSION@:$$v:" -e"s:[@]YEAR@:$$y:" < $< > $@
61 # Rules for converting man->html
62 dist_man_MANS = gaf.1
63 html_man_files =
64 if ENABLE_GROFF_HTML
65 html_man_files += gaf.html
66 endif
68 docsmandir=$(docdir)/man
69 docsman_DATA=$(html_man_files)
70 if ENABLE_GROFF_HTML
71 .1.html:
72         $(AM_V_GEN)\
73         rm -rf $@.tmp && \
74         LC_NUMERIC=C $(GROFF) -man -T html  $< >$@.tmp && \
75         mv -f $@.tmp $@
76 else
77 .1.html:
78         @echo "No working groff available: cannot create $@"
79         @! :
80 endif
82 SUFFIXES = .x .1.in .1 .html
84 CLEANFILES = $(BUILT_SOURCES)
85 MAINTAINERCLEANFILES = ChangeLog