Skip to content

Commit

Permalink
Improve handling of intermediate files generated by lex, yacc.
Browse files Browse the repository at this point in the history
The Automake manual recommends not to put intermediate files into
SOURCES. The *.c files go into BUILT_SOURCES to ensure that those
files get built before everything else.
  • Loading branch information
hillu authored and plusvic committed Jul 1, 2017
1 parent 36a02ee commit c57c6c1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions libyara/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ lib_LTLIBRARIES = libyara.la

libyara_la_LDFLAGS = -version-number 3:6:0

BUILT_SOURCES = \
lexer.c \
hex_lexer.c \
re_lexer.c \
grammar.c \
hex_grammar.c \
re_grammar.c

libyara_la_SOURCES = \
$(MODULES) \
grammar.y \
Expand All @@ -100,9 +108,7 @@ libyara_la_SOURCES = \
hash.c \
hash.h \
hex_grammar.y \
hex_lexer.h \
hex_lexer.l \
lexer.h \
lexer.l \
libyara.c \
mem.c \
Expand All @@ -119,7 +125,6 @@ libyara_la_SOURCES = \
re.c \
re.h \
re_grammar.y \
re_lexer.h \
re_lexer.l \
rules.c \
scan.c \
Expand Down

0 comments on commit c57c6c1

Please sign in to comment.