]> gitweb @ CieloNegro.org - autobuild.git/blob - Makefile
The 'source' built-in command tries to search for the given filename in PATH when...
[autobuild.git] / Makefile
1 SOURCES = \
2         src/preamble.bash \
3         lib/detectNumCPUs.bash \
4         lib/run.bash \
5         lib/setPath.bash \
6         src/functions.bash \
7         src/resource.bash \
8         src/main.bash \
9         $(NULL)
10
11 all: Build
12
13 clean:
14         rm -f Build Build.tmp
15
16 Build: $(SOURCES)
17 # Concatenate the source files to $@.tmp.
18         rm -f $@ $@.tmp
19         for i in $(SOURCES); do \
20                 cat $$i >> $@.tmp; \
21                 echo >> $@.tmp; \
22         done
23 # Copy the content of $@.tmp to $@ except for the last line.
24         lines=`wc -l $@.tmp | awk '{print $$1}'` && \
25                 lines=`expr $$lines - 1` && \
26                 head -n $$lines $@.tmp > $@
27 # Clean up.
28         rm -f $@.tmp
29         chmod a=rx $@
30
31 .PHONY: all clean