Make.rules 1.3 KB
Newer Older
1 2 3 4 5 6
# flex & bison deps
#
%.c %.h: %.l
	$(AM_V_GEN)$(LEX) --header-file=$(@:.c=.h) -o $(@:.h=.c) $< \
	   || ( $(RM) $(basename $@).h $(basename $@).c ; exit 1) 

7 8 9
# 
# specific rule for codesparser generation; we want the header to land in
# the codes/ directory because it will be installed for use by other repos
10 11 12 13 14
#src/iokernellang/codesparser.c codes/codesparser.h: src/iokernellang/codesparser.y
#	mkdir -p codes
#	@test "x$(bison_ok)" != "yes" || echo "*** WARNING *** Bison version might be too old"
#	$(AM_V_GEN)$(YACC) --defines=codes/codesparser.h -o src/iokernellang/codesparser.c  $< \
#	   || ( $(RM) $(basename $@).h $(basename $@).c ; exit 1)
15 16


17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
%.c %.h: %.y
	@test "x$(bison_ok)" != "yes" || echo "*** WARNING *** Bison version might be too old"
	$(AM_V_GEN)$(YACC) --defines=$(@:.c=.h) -o $(@:.h=.c)  $< \
	   || ( $(RM) $(basename $@).h $(basename $@).c ; exit 1)



# %.y: %.y.in Makefile
#	$(AM_V_GEN)$(SED) -e 's,[@]CODES_PURE_PARSER_DEFINES[@],$(CODES_PURE_PARSER_DEFINES),g' \
#	-e 's,[@]CODES_PUSH_PARSER_DEFINES[@],$(CODES_PUSH_PARSER_DEFINES),g' \
#	< src/common/iokernellang/codesparser.y.in > src/common/iokernellang/codesparser.y

#
# Output dist version
#
.phony: distversion
distversion:
	@echo $(VERSION)

#
# Easy way to build unit tests without running them
# 
.phony: tests
tests: $(check_PROGRAMS)