author | wenzelm |
Wed, 15 Feb 2006 21:34:55 +0100 | |
changeset 19046 | bc5c6c9b114e |
parent 17944 | f5ff234ce6b3 |
child 19331 | f5e84acd7d3f |
permissions | -rwxr-xr-x |
17742 | 1 |
#!/usr/bin/env bash |
2 |
# $Id$ |
|
3 |
||
4 |
# build make dependency file |
|
5 |
||
6 |
# parameters |
|
7 |
FIND="$1" |
|
8 |
OUTPUTROOT="$2" |
|
9 |
DEP_FILE="$3" |
|
10 |
STATICDIRS="$4" |
|
11 |
||
12 |
rm -f "$DEP_FILE" |
|
13 |
touch "$DEP_FILE" |
|
14 |
echo '# This is a generated file; do not edit' >> "$DEP_FILE" |
|
15 |
echo >> "$DEP_FILE" |
|
16 |
allstatic='' |
|
17 |
for dir in $STATICDIRS |
|
18 |
do |
|
19 |
for file in $("$FIND" "$dir" -follow -type f -a ! -path "*/CVS/*") |
|
20 |
do |
|
21 |
outputfile="\$(OUTPUTROOT)/$file" |
|
22 |
echo "$outputfile: $file" >> "$DEP_FILE" |
|
23 |
echo ' mkdir -p $(dir $@)' >> "$DEP_FILE" |
|
24 |
echo ' -chmod $(TARGET_UMASK_DIR) $(dir $@)' >> "$DEP_FILE" |
|
25 |
echo ' -chgrp $(TARGET_GROUP) $(dir $@)' >> "$DEP_FILE" |
|
17752 | 26 |
echo ' -[ -e $@ ] && rm $@' >> "$DEP_FILE" |
17742 | 27 |
echo ' cp $< $@' >> "$DEP_FILE" |
17944
f5ff234ce6b3
towards an improved website/makedist integration
haftmann
parents:
17752
diff
changeset
|
28 |
echo ' chmod $(TARGET_UMASK_FILE) $@' >> "$DEP_FILE" |
17742 | 29 |
echo ' chgrp $(TARGET_GROUP) $@' >> "$DEP_FILE" |
30 |
allstatic="$allstatic$outputfile " |
|
31 |
echo >> "$DEP_FILE" |
|
32 |
done |
|
33 |
done |
|
34 |
echo "DEP_ALLSTATIC=$allstatic" >> "$DEP_FILE" |
|
35 |
echo >> "$DEP_FILE" |
|
36 |
echo 'DEP_HTML=$(DEP_ALLSTATIC) include/documentationdist.include.html $(DEP_FILE) $(CONF)' >> "$DEP_FILE" |
|
37 |
echo >> "$DEP_FILE" |
|
38 |
allhtml='' |
|
39 |
for html in $("$FIND" . -name "*.html" -a ! -name "*.include.html") |
|
40 |
do |
|
41 |
outputfile="\$(OUTPUTROOT)/$html" |
|
42 |
echo "$outputfile: $html \$(DEP_HTML)" >> "$DEP_FILE" |
|
43 |
echo ' mkdir -p $(dir $@)' >> "$DEP_FILE" |
|
44 |
echo ' -chmod $(TARGET_UMASK_DIR) $(dir $@)' >> "$DEP_FILE" |
|
45 |
echo ' -chgrp $(TARGET_GROUP) $(dir $@)' >> "$DEP_FILE" |
|
17752 | 46 |
echo ' -[ -e $@ ] && rm $@' >> "$DEP_FILE" |
17742 | 47 |
echo ' $(PYTHON) build/pypager.py --dtd="dtd/" $(FORCE_ENC_CMD) --srcroot="." --dstroot="$(OUTPUTROOT)" distname="$(DISTNAME)" $< $@' >> "$DEP_FILE" |
48 |
echo ' -$(TIDYCMD) $@' >> "$DEP_FILE" |
|
17944
f5ff234ce6b3
towards an improved website/makedist integration
haftmann
parents:
17752
diff
changeset
|
49 |
echo ' chmod $(TARGET_UMASK_FILE) $@' >> "$DEP_FILE" |
17742 | 50 |
echo ' chgrp $(TARGET_GROUP) $@' >> "$DEP_FILE" |
51 |
allhtml="$allhtml$outputfile "; \ |
|
52 |
echo >> "$DEP_FILE" |
|
53 |
done; \ |
|
54 |
echo "DEP_ALLHTML=$allhtml" >> "$DEP_FILE" |
|
55 |
echo >> "$DEP_FILE" |
|
56 |
echo 'allsite: $(DEP_ALLHTML) $(DEP_ALLSTATIC)' >> "$DEP_FILE" |
|
57 |
echo ".PHONY: allsite" >> "$DEP_FILE" |