add LM 5 hw, caryatid
[light-and-matter.git] / Makefile
blob649f6427c777a96dd904ab2dc7d80f06bd76ec2c
1 RUN_ERUBY = perl -I../scripts ../scripts/run_eruby.pl
3 default:
4 @echo "Please see the README file for information on how to produce PDF files."
6 books_all:
7 cd lm && make book && cd ..
8 cd sn && make book && cd ..
9 cd cp && make book && cd ..
10 cd me && make book && cd ..
12 setup:
13 chmod +x scripts/* eruby_util.rb fruby mv_silent process_geom_file.pl
14 @echo "If the following command doesn't give a compiler error, you have a sufficiently up to date version of ruby (1.9.2 or later)."
15 ruby -e 'x=("ab" =~ /(?<!a)b/); require "psych"; require "yaml"'
16 @echo "If the following command doesn't give a compiler error, you have a sufficiently up to date version of libjson-perl."
17 @echo "If your version of the library is too old, you can uninstall it and then install the latest version by doing 'cpan JSON'."
18 perl -e 'use JSON 2.0'
20 clean_all:
21 cd lm && make clean && cd ..
22 cd cp && make clean && cd ..
23 cd sn && make clean && cd ..
24 cd me && make clean && cd ..
26 very_clean_all:
27 cd lm && make very_clean && cd ..
28 cd cp && make very_clean && cd ..
29 cd sn && make very_clean && cd ..
30 cd me && make very_clean && cd ..
32 prepress_all:
33 cd lm && make prepress && cd ..
34 cd cp && make prepress && cd ..
35 cd sn && make prepress && cd ..
36 cd me && make prepress && cd ..
38 run_eruby_all:
39 cd lm && $(RUN_ERUBY) && cd ..
40 cd cp && $(RUN_ERUBY) && cd ..
41 cd sn && $(RUN_ERUBY) && cd ..
42 cd me && $(RUN_ERUBY) && cd ..
44 web_all:
45 cd lm && make web && cd ..
46 cd cp && make web && cd ..
47 cd sn && make web && cd ..
48 cd me && make web && cd ..
50 post_all:
51 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
52 # Make sure you've built all the books, first!
53 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
54 cd lm && make post && cd ..
55 cd cp && make post && cd ..
56 cd sn && make post && cd ..
57 cd me && make post && cd ..
59 handheld_all:
60 cd lm && make handheld && cd ..
61 cd cp && make handheld && cd ..
62 cd sn && make handheld && cd ..
63 cd me && make handheld && cd ..
65 problems:
66 # For some reason, this always fails the first time -- do it twice!?
67 cat */ch*_problems.csv | sort >temp.csv
68 mv data/problems.csv data/problems.bak
69 scripts/sort_problems.pl <temp.csv >data/problems.csv
70 rm temp.csv
71 diff data/problems.bak data/problems.csv
72 ssed -R -e "s/(\w+),(\d+),(\d+),(.*),\d/m4_define(__hw_\1_\2_\4,\3)m4_dnl/g" data/problems.csv >data/problems.m4
74 all_figures:
75 make lm_cover
76 make me_cover
77 make interior_figures
79 interior_figures:
80 # The following requires Inkscape 0.47 or later.
81 perl -e 'foreach my $$f(<*/*/figs/*.svg>) {system("scripts/render_one_figure.pl $$f")}'
82 perl -e 'foreach my $$f(<share/misc/arrows/*.svg>) {system("scripts/render_one_figure.pl $$f")}'
83 # For better reliability in RIP, make png versions as well.
84 perl -e 'foreach my $$f(<*/*/figs/*.pdf>) {system("scripts/pdf_to_bitmap.pl $$f")}'
85 perl -e 'foreach my $$f(<share/misc/arrows/*.pdf>) {system("scripts/pdf_to_bitmap.pl $$f")}'
87 preflight_figs:
88 @echo "checking all figures in all books for transparency, broken links, embedded fonts, bad structure..."
89 scripts/preflight_figs.pl
90 @echo "...done"
92 lm_cover:
93 cd lm/front/figs && inkscape --export-text-to-path --export-dpi=300 --export-png=temp.png cover_parts/cover.svg && convert temp.png cover.jpg && rm -f temp.png && cd -
95 me_cover:
96 cd me/front/figs && inkscape --export-text-to-path --export-dpi=300 --export-png=temp.png cover_parts/cover.svg && convert temp.png cover.jpg && rm -f temp.png && cd -