summaryrefslogtreecommitdiff
path: root/gen-deps.sh
blob: 6f7b4af4e30587631c59593e5a1418dec9319690 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
# This script wraps gcc -MM, which unhelpfully strips the directory
# off of the input filename.  In other words, if you run:
#
# $ gcc -MM src/upb_parse.c
#
# ...the emitted dependency information looks like:
#
# upb_parse.o: src/upb_parse.h [...]
#
# Since upb_parse.o is actually in src, the dependency information is
# not used.  To remedy this, we use the -MT flag (see gcc docs).

rm -f deps
for file in $@; do
  gcc -MM $file -MT ${file%.*}.o -Idescriptor -Isrc -I. >> deps
done
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback