-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile.private
62 lines (56 loc) · 2.72 KB
/
Makefile.private
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
CHECKMANDIR = ~/git/mkde/htdocs/checkmk
# These are targets only needed by the maintainers of
# the official distribution of Check_MK
release:
@if [ -e /var/www/80/mathias-kettner.de/download/check_mk-$(VERSION).tar.gz -o \
-e /var/www/80/archive.mathias-kettner.de/check_mk/check_mk-$(VERSION).tar.gz ] ; then \
echo "Diese Release existiert schon!" ; \
false ; \
fi
@$(MAKE) check-uncommitted check-git
@$(MAKE) check
@$(MAKE) mrproper
@$(MAKE) dist rpm deb
@figlet "Fertig. Auf ins mkde..."
@$(MAKE) -C ../mkde update-checkmk
@cd ../mkde ; ./cmk_version_eintragen $(VERSION) > check_mk.inc.neu && \
mv check_mk.inc.neu htdocs/check_mk.inc && \
for version in $$(cat oldversions) ; do \
mv -v htdocs/download/*[-_]$$version[-_.]* /var/www/80/archive.mathias-kettner.de/check_mk/ 2>/dev/null && \
git rm htdocs/download/*[-_]$$version[-_.]* || true ; \
done ; rm -f oldversions ; \
git add htdocs/download
figlet SUPER.
git tag -f -am 'Official Release $(VERSION)' v$(VERSION)
check-uncommitted:
@echo -n "Checking for uncommitted changes..."
@if git status --porcelain | grep . ; then false ; else true ; fi
check-git:
@BRANCH=$$(cat .git/HEAD | cut -d/ -f3) ; echo $$BRANCH && \
git fetch origin $$BRANCH && \
fetch_head=$$(cut -d' ' -f1 .git/FETCH_HEAD) && \
head=$$(cat .git/refs/heads/$$BRANCH) && \
[ "$$fetch_head" = "$$head" ] || { \
echo "Local git branch $$BRANCH is not up-to-date!" ; \
echo "FETCH_HEAD: [$$fetch_head]" ; \
echo "local $$BRANCH: [$$head]" ; \
false ; \
}
mkde:
cp -v agents/windows/install_agent.exe check-mk-agent-$(VERSION).exe
echo 'TI:Table of check types (incomplete)' > $(CHECKMANDIR)/checks
echo "DT:$$(date +%F)" >> $(CHECKMANDIR)/checks
echo "H1:Table of checks with documentation" >> $(CHECKMANDIR)/checks
echo "The following table shows all checks in the current check_mk distribution " >> $(CHECKMANDIR)/checks
echo "that provide online documentation. You can see the same documentation " >> $(CHECKMANDIR)/checks
echo "by calling check_mk with the option <b>-M</b> and the name of the check, for example:" >> $(CHECKMANDIR)/checks
echo "C+:" >> $(CHECKMANDIR)/checks
echo "RP:check_mk -M ps" >> $(CHECKMANDIR)/checks
echo "C-:" >> $(CHECKMANDIR)/checks
echo "H2:Table of documented checks" >> $(CHECKMANDIR)/checks
echo "<table><tr><th>Name</th><th>Title</th></tr>">> $(CHECKMANDIR)/checks
for check in $$(cd checkman ; ls | fgrep -v '~') ; \
do ./check_mk --nowiki -M $$check > $(CHECKMANDIR)/check_$$check 2>> $(CHECKMANDIR)/checks ; \
done
echo "</table>" >> $(CHECKMANDIR)/checks
make -C $(CHECKMANDIR)/../.. install