-
Notifications
You must be signed in to change notification settings - Fork 27
/
dev-makefile
67 lines (56 loc) · 1.9 KB
/
dev-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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
LDMHOME = `cd .. && pwd`
CONFIGURE_OPTS = --disable-root-actions --enable-debug --with-noaaport --prefix=$(LDMHOME) LDMHOME=$(LDMHOME)
# Check package using cc(1)
check-cc:
$(MAKE) clean >/dev/null
./configure $(CONFIGURE_OPTS) CC=cc
$(MAKE) distcheck
# Check package using clang(1)
check-clang:
$(MAKE) clean >/dev/null
./configure $(CONFIGURE_OPTS) CC=clang
$(MAKE) distcheck
# Check package
check: check-cc check-clang
# Scan code using clang(1)
clang-scan:
$(MAKE) clean
rm -rf /tmp/scan-build-*
scan-build $(MAKE)
COVERITY_SCAN_FILE = ldm.tgz
# Create a submission file for Coverity Scan
$(COVERITY_SCAN_FILE):
$(MAKE) distclean
./configure --enable-debug --with-noaaport --with-ingester CC=gcc >& configure.log
rm -rf cov-int
cov-build --dir cov-int $(MAKE)
tail cov-int/build-log.txt
tail cov-int/build-log.txt | \
grep -i 'compilation units (.*) are ready for analysis'
tail cov-int/build-log.txt | \
grep -Fi 'The cov-build utility completed successfully'
tar czvf $(COVERITY_SCAN_FILE) cov-int
rm -rf cov-int
# Scan code using Coverity Scan
coverity-scan: $(COVERITY_SCAN_FILE)
curl --form token=`cat $$HOME/.ssh/ldm-coverity-scan-token` \
--form email=emmerson@ucar.edu \
--form file=@$(COVERITY_SCAN_FILE) \
--form version=`awk '{print $$1; exit}' CHANGE_LOG` \
--form description="make scan" \
--silent --show-error \
https://scan.coverity.com/builds?project=Unidata%2FLDM \
> /dev/null # Redirection is necessary to avoid appearance of hanging
# rm $(COVERITY_SCAN_FILE)
scan: coverity-scan clang-scan
Makefile: configure
LDMHOME=`cd .. && pwd`; \
./configure --disable-root-actions --enable-debug --with-noaaport \
--with-multicast --prefix=$$LDMHOME LDMHOME=$$LDMHOME
reset:
-$(MAKE) distclean
aclocal
autoreconf -fi
./configure $(CONFIGURE_OPTS)
.PHONY: check-cc check-clang check clang-scan coverity-scan scan \
$(COVERITY_SCAN_FILE) reset