mkogg.py: Fix 'self.get_mp4_metadata(self, source)'
[blog.git] / posts / Make_gotcha.mdwn
1 [[!meta  title="Make gotcha"]]
2 [[!meta  date="2008-08-31 18:47:36"]]
3 Alrighty, this one had me stumped for a while:
4
5     $ cat Makefile
6     DIRA=dirA
7     DIRB =dirB
8     DIRC = dirC
9     DIRD=dirD# immediate comment
10     DIRE= dirE# immediate comment
11     DIRF=dirF
12     DIRG=dirG # (dirF has a trailing space too)
13     FILE = a  # more spaces here
14
15     make : $(DIRA)/$(FILE) $(DIRB)/$(FILE) $(DIRC)/$(FILE) $(DIRD)/$(FILE) $(DIRE)/$(FILE) $(DIRF)/$(FILE) $(DIRG)/$(FILE)
16             echo "done"
17     % :
18             echo "looking for $@"
19     $ make
20     looking for dirA/a
21     looking for dirB/a
22     looking for dirC/a
23     looking for dirD/a
24     looking for dirE/a
25     looking for dirF
26     looking for /a
27     looking for dirG
28     done
29
30 Apparently bonus whitespace (normally before a comment or after an
31 equals sign) in variable definitions is stripped from the front of a
32 definition, but not the back.  You have been warned ;).
33
34 [[!tag tags/programming]]