forked from fossology/fossology
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
87 lines (69 loc) · 2.02 KB
/
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# FOSSology Makefile
# Copyright (C) 2008-2011 Hewlett-Packard Development Company, L.P.
# pull in all our default variables
include Makefile.conf
# the directories we do things in by default
DIRS = install src
# create lists of targets for various operations
# these are phony targets (declared at bottom) of convenience so we can
# run 'make $(operation)-$(subdir)'. Yet another convenience, a target of
# '$(subdir)' is equivalent to 'build-$(subdir)'
BUILDDIRS = $(DIRS:%=build-%)
INSTALLDIRS = $(DIRS:%=install-%)
UNINSTALLDIRS = $(DIRS:%=uninstall-%)
CLEANDIRS = $(DIRS:%=clean-%)
TESTDIRS = $(DIRS:%=test-%)
COVDIRS = $(DIRS:%=cov-%)
CONFPATH = $(SYSCONFDIR)
## Targets
# build
all: $(BUILDDIRS) VERSIONFILE
$(DIRS): $(BUILDDIRS)
$(BUILDDIRS):
$(MAKE) -C $(@:build-%=%)
# high level dependencies:
# the scheduler and agents need the library built first
build-scheduler: build-src
build-agents: build-src
# utils is a separate target, since it isn't built by default yet
utils: build-utils
# generate the VERSION file
TOP = .
VERSIONFILE:
$(call WriteVERSIONFile,"BUILD")
# install depends on everything being built first
install: all $(INSTALLDIRS)
$(INSTALLDIRS):
$(INSTALL) -m 666 VERSION $(DESTDIR)$(CONFPATH)/VERSION
$(MAKE) -C $(@:install-%=%) install
uninstall: $(UNINSTALLDIRS)
$(UNINSTALLDIRS):
$(MAKE) -C $(@:uninstall-%=%) uninstall
# test depends on everything being built first
test: all $(TESTDIRS)
$(TESTDIRS):
$(MAKE) -C $(@:test-%=%) test
coverage: $(COVDIRS)
$(COVDIRS):
$(MAKE) -C $(@:cov-%=%) coverage
clean: $(CLEANDIRS)
rm -f variable.list VERSION
$(CLEANDIRS):
$(MAKE) -C $(@:clean-%=%) clean
phpvendors:
$(MAKE) -C $(FOSRCDIR) phpvendors
# release stuff
tar: dist-testing
dist-testing:
utils/fo-mktar -s
tar-release: dist
dist:
utils/fo-mktar
empty-cache:
$(MAKE) -C $(FOWWWDIR) empty-cache
%:
$(MAKE) -C $(FOSRCDIR) $@
.PHONY: $(BUILDDIRS) $(DIRS) $(INSTALLDIRS) $(UNINSTALLDIRS)
.PHONY: $(TESTDIRS) $(CLEANDIRS)
.PHONY: all install uninstall clean test utils
.PHONY: dist dist-testing tar tar-release