-
Notifications
You must be signed in to change notification settings - Fork 25
/
Makefile
36 lines (28 loc) · 847 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
include ./Makefile.inc
REL_FILE := RELEASE
.PHONY: all
all:
$(MAKE) -C src all
$(MAKE) -C tests all
$(MAKE) -C wrapper all
#
# generate 'release log' file
#
/bin/echo -e "last build: "`date -R`"\nmodule version: " \
`grep -i "__mod_ver__" src/$(MODULE).h|awk '{print $$3}'|sed 's/\"//g'` \
"\nhis date:" `grep -i '[a-z]\+\ [0-9]\+\, [0-9]\+\:' ChangeLog \
-m1 |sed 's/\://'|sed 's/[ ]\+//'` "\n" > $(REL_FILE)
#
# update 'last modified date'
#
sed -i "s/Last modified: [a-zA-Z0-9]\+[\ \-]\+[0-9]\+[\,\ \-]\+[0-9]\+/Last modified: `grep -i '[a-z]\+\ [0-9]\+\, [0-9]\+\:' ChangeLog -m1|sed 's/\://'|sed 's/\ \+//'`/g" src/$(MODULE).h
.PHONY: clean
clean:
$(MAKE) -C src clean
$(MAKE) -C tests clean
$(MAKE) -C wrapper clean
rm -rf $(REL_FILE)
.PHONY: distclean
distclean:clean
rm -rf cscope.*
rm -rf tags