1#
2# Rules for supporting tarball builds.  Mostly pregen'ing files that
3# require non-assumable dependancies.
4#
5
6set(MKTAR_GENFILES "${CMAKE_CURRENT_BINARY_DIR}/MKTAR_GENFILES")
7
8# The lex/yacc output files are definitely on the list.  The manual is
9# also, but is currently built manually rather than via this build
10# because it turns out to require a lot more conditional code (changing
11# how/when things get sub'd around) than it's worth, so we leave that
12# done manually in the doc/Makefile.
13add_custom_target(mktar_genfiles
14	COMMENT "Building generated files for tarball."
15	DEPENDS ${MKTAR_GENFILES}
16	DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/lex.c
17	DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gram.tab.c
18	DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gram.tab.h
19)
20
21add_custom_command(OUTPUT ${MKTAR_GENFILES}
22	COMMENT "touch MKTAR_GENFILES"
23	COMMAND touch ${MKTAR_GENFILES}
24)
25