4
4
OPTIONS = @OPTIONS@
5
5
DOWNLOAD_LIB_CACHE = @DOWNLOAD_LIB_CACHE@
6
6
7
+ # pull in dependency make fragments
8
+ include $(SRC)/mak/modules.mk
9
+ include $(SRC)/mak/*.sipxecs.mk
10
+ include $(SRC)/*/.sipxecs.mk
11
+
7
12
help.sipx=Build all sipx components including targets autoreconf, configure, all and install targets
8
13
build sipx :
9
14
$(MAKE) $(foreach P,$(sipx),$(P))
10
15
11
- help.app=Build all sipx apps including targets autoreconf, configure, all and install targets
12
- app :
13
- $(MAKE) $(foreach P,$(app),$(P))
14
-
15
- # pull in dependency make fragments
16
- include $(SRC)/*/.sipxecs.mk
17
- include $(SRC)/mak/*.sipxecs.mk
18
-
19
16
# Only the main rpm
20
- $(foreach P,$(sipx) $(app) ,$(eval $(P)_TAR = $(P)/$$(call lowercase,$(P))-$(PACKAGE_VERSION).tar.gz))
17
+ $(foreach P,$(sipx),$(eval $(P)_TAR = $(P)/$$(call lowercase,$(P))-$(PACKAGE_VERSION).tar.gz))
21
18
22
19
# Initialize submodules as we need them and only the specific submodule. This allows
23
20
# many submodules to be defined, but only requested submodules to be loaded. There
@@ -31,9 +28,9 @@ $(SRC)/%/.git :
31
28
git submodule init $*; \
32
29
git submodule update $*
33
30
34
- .PHONY:$(sipx) $(app)
31
+ .PHONY:$(sipx)
35
32
.SECONDEXPANSION:
36
- $(sipx) $(app) : $$($$@_DEPS) $$($$@_GIT_SUBMODULE)
33
+ $(sipx) : $$($$@_DEPS) $$($$@_GIT_SUBMODULE)
37
34
@echo "$$rm_on_deps_change" | \
38
35
DEP_TARGETS="$(addprefix $(PROJ)/,$($@_DEPS=.installed))" \
39
36
TARGET=$(PROJ)/.installed \
@@ -43,10 +40,10 @@ $(sipx) $(app) : $$($$@_DEPS) $$($$@_GIT_SUBMODULE)
43
40
touch $(PROJ)/.installed; \
44
41
fi
45
42
46
- $(foreach T,$(sipx) $(app) ,$(T).build) : %.build : %.autoreconf %.configure %.all-install;
43
+ $(foreach T,$(sipx),$(T).build) : %.build : %.autoreconf %.configure %.all-install;
47
44
48
45
help.{1|6}.all-install=Run 'make all install' in each target
49
- $(foreach T,$(sipx) $(app) ,$(T).all-install) : %.all-install : %.all %.install ;
46
+ $(foreach T,$(sipx),$(T).all-install) : %.all-install : %.all %.install ;
50
47
51
48
# Targets for sipx and lib. Uses pattern %.xyz so libs can implement their own
52
49
# implementation that will override the patterned one. i.e. freeswitch.autoreconf
@@ -58,7 +55,7 @@ help.{1|2|6}.autoreconf=Run autoreconf on each project
58
55
autoreconf -if
59
56
60
57
# TODO: Needs to support switching branches automatically
61
- $(foreach P,$(sipx) $(app) $(lib ),$(SRC)/$(P)) : $(SRC)/% :
58
+ $(foreach P,$(all ),$(SRC)/$(P)) : $(SRC)/% :
62
59
git clone $($*_REPO) $*.git
63
60
mv $*.git $@
64
61
@@ -70,11 +67,11 @@ help.{1|2|6}.configure = Run configure on each project
70
67
71
68
.SECONDEXPANSION:
72
69
help.{1|2|6}.dist-only : Force a build of the archive (tarball) for this project
73
- $(sipx:=.dist-only) $(app:=.dist-only) : %.dist-only : %.autoreconf %.configure %.dist_;
70
+ $(sipx:=.dist-only) : %.dist-only : %.autoreconf %.configure %.dist_;
74
71
%.dist_ :
75
72
$(MAKE) -C $(PROJ) dist
76
73
help.{1|2|6}.dist = Build archive, typically compressed tar
77
- $(sipx:=.dist) $(app:=.dist) : %.dist : $$(addsuffix .dist,$$(filter-out $$(lib_all),$$($$*_DEPS))) $$($$*_GIT_SUBMODULE)
74
+ $(sipx:=.dist): %.dist : $$(addsuffix .dist,$$(filter-out $$(lib_all),$$($$*_DEPS))) $$($$*_GIT_SUBMODULE)
78
75
@if test -f $($(PROJ)_TAR) ; then \
79
76
x=`find $(SRC)/$(PROJ)/ -type f \( \
80
77
-not -name configure \
@@ -102,16 +99,16 @@ $(sipx:=.dist) $(app:=.dist): %.dist : $$(addsuffix .dist,$$(filter-out $$(lib_a
102
99
# Targets for sipx only.
103
100
MAKE_COMMANDS = check install clean dist
104
101
$(foreach C,$(MAKE_COMMANDS) all,$(eval help.{1}.$(C)=Run make $(C) on each project))
105
- $(foreach P,$(sipx) $(app) ,$(P).install) :; $(MAKE) -C $(PROJ) install
106
- $(foreach P,$(sipx) $(app) ,$(P).clean) :
102
+ $(foreach P,$(sipx),$(P).install) :; $(MAKE) -C $(PROJ) install
103
+ $(foreach P,$(sipx),$(P).clean) :
107
104
$(MAKE) -C $(PROJ) clean
108
105
! test -f $(PROJ)/.installed || rm $(PROJ)/.installed
109
106
110
- $(foreach P,$(sipx) $(app) ,$(P).check) :; $(MAKE) -C $(PROJ) check
107
+ $(foreach P,$(sipx),$(P).check) :; $(MAKE) -C $(PROJ) check
111
108
112
109
# projects do not all have an "all" target, they probably should, until then, use
113
110
# no-target default
114
- $(foreach C,all,$(foreach T,$(sipx) $(app) ,$(T).all)) :
111
+ $(foreach C,all,$(foreach T,$(sipx),$(T).all)) :
115
112
$(MAKE) -C $(PROJ)
116
113
117
114
# This first checks if any files have changed in a project, if not, then
0 commit comments