Skip to content

Commit

Permalink
build: Don't dist generated sources
Browse files Browse the repository at this point in the history
Instead of distributing vteseq-list.h and vteseq-n.cc, just generate
them at build time.

https://bugzilla.gnome.org/show_bug.cgi?id=780163
  • Loading branch information
Christian Persch committed Mar 20, 2017
1 parent f078b6b commit 3e556b5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
8 changes: 8 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,14 @@ if test -z "$GLIB_COMPILE_RESOURCES"; then
fi
fi

AC_ARG_VAR([GPERF],[the gperf programme])
if test -z "$GPERF"; then
AC_PATH_PROG([GPERF],[gperf],[])
if test -z "$GPERF"; then
AC_MSG_ERROR([gperf not found])
fi
fi

AC_ARG_VAR([XMLLINT],[the xmllint programme])
if test -z "$XMLLINT"; then
AC_PATH_PROG([XMLLINT],[xmllint],[])
Expand Down
19 changes: 13 additions & 6 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,18 @@ libvte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_la_LIBADD = \

# Generated sources

VTESEQ_BUILTSOURCES = vteseq-list.h vteseq-n.cc
BUILT_SOURCES = box_drawing.h marshal.cc marshal.h vtetypebuiltins.cc vte/vtetypebuiltins.h vteresources.cc $(VTESEQ_BUILTSOURCES)
MAINTAINERCLEANFILES += $(VTESEQ_BUILTSOURCES)
EXTRA_DIST += $(VTESEQ_BUILTSOURCES) box_drawing.txt box_drawing_generate.sh iso2022.txt
CLEANFILES += box_drawing.h marshal.cc marshal.h vtetypebuiltins.cc vte/vtetypebuiltins.h stamp-vtetypebuiltins.h vteresources.cc
BUILT_SOURCES = \
box_drawing.h \
marshal.cc \
marshal.h \
vtetypebuiltins.cc \
vte/vtetypebuiltins.h \
vteresources.cc \
vteseq-list.h \
vteseq-n.cc \
$(NULL)
EXTRA_DIST += box_drawing.txt box_drawing_generate.sh iso2022.txt
CLEANFILES += $(BUILT_SOURCES) stamp-vtetypebuiltins.h

box_drawing.h: box_drawing.txt box_drawing_generate.sh
$(AM_V_GEN) $(srcdir)/box_drawing_generate.sh < $< > $@
Expand All @@ -163,7 +170,7 @@ vtetypebuiltins.cc: vtetypebuiltins.cc.template vte/vteenums.h vte/vtedeprecated
&& rm -f xgen-vtbc

vteseq-n.cc: vteseq-n.gperf
$(AM_V_GEN) $(top_srcdir)/missing --run gperf -m 100 $< > $@.tmp && \
$(AM_V_GEN) $(top_srcdir)/missing --run $(GPERF) -m 100 $< > $@.tmp && \
mv -f $@.tmp $@

vteseq-list.h: vteseq-n.gperf
Expand Down

0 comments on commit 3e556b5

Please sign in to comment.