|
1 | 1 | ## Eventually we can write a script to autogenerate these builder
|
2 | 2 | ## rules, for the mean time, it'll look like the following:
|
3 | 3 |
|
4 |
| -.PHONY: tables |
| 4 | +.PHONY: tables clean-tables |
5 | 5 |
|
6 |
| -# a phony target to build all table pages, add each built table to this dependency here: |
7 |
| -tables: source/includes/table-sql-to-agg-examples.rst source/includes/table-sql-to-agg-terms.rst |
8 |
| - # a noop until there are actual tables here |
| 6 | +# add each built table to this variable here: |
| 7 | +output-tables = source/includes/table-sql-to-agg-examples.rst source/includes/table-sql-to-agg-terms.rst |
| 8 | +tables: $(output-tables) |
| 9 | + @git update-index --assume-unchanged # |
| 10 | + @echo [build]: clensing git index of $(output-tables) |
| 11 | + |
| 12 | +clean-tables: |
| 13 | + rm -rf $(output-tables) |
9 | 14 |
|
10 | 15 | # each table will build from a '.yaml' table file the includes
|
11 | 16 | # directory, into a '.rst' file in the includes directory, using the
|
12 | 17 | # 'table_builder.py' script. The build rules for these files will look
|
13 | 18 | # like the following.
|
14 | 19 |
|
15 |
| -source/includes/table-sql-to-agg-terms.rst:source/includes/table/sql-to-agg-terms.yaml |
| 20 | +source/includes/table-sql-to-agg-terms.rst:source/includes/table-sql-to-agg-terms.yaml |
16 | 21 | @$(PYTHONBIN) bin/table_builder.py $< $@
|
17 |
| - @[table-builder]: \(re\)generate $@ table for inclusion in build |
18 |
| -source/includes/table-sql-to-agg-examples.rst:source/includes/table/sql-to-agg-examples.yaml |
| 22 | + @echo [table-builder]: \(re\)generate $@ table for inclusion in build |
| 23 | +source/includes/table-sql-to-agg-examples.rst:source/includes/table-sql-to-agg-examples.yaml |
19 | 24 | @$(PYTHONBIN) bin/table_builder.py $< $@
|
20 |
| - @[table-builder]: \(re\)generate $@ table for inclusion in build |
| 25 | + @echo [table-builder]: \(re\)generate $@ table for inclusion in build |
21 | 26 |
|
0 commit comments