Skip to content
Browse files

missing files from last commit

  • Loading branch information...
1 parent c0176b8 commit 800b09e4f630b12e8f9b2a288f5791e9a428c549 @ezuce-admin ezuce-admin committed
Showing with 71 additions and 28 deletions.
  1. +0 −21 Makefile.in
  2. +34 −7 mak/build.mk.in
  3. +37 −0 mak/modules.mk.in
View
21 Makefile.in
@@ -27,17 +27,6 @@ PROJ = $(filter $(all),$(subst ., ,$@))
proj = $(call lowercase,$(PROJ))
PROJ_REVISION = $(shell cd $(SRC)/$(PROJ) && ./config/revision-gen @PACKAGE_VERSION@)
-# find any matches of $(sipx) or $(lib) anywhere in a target string and expands it into multiple target that
-# would follow the given target.
-# example: foo.B.bar... becomes 'foo.B.bar foo.C.bar' when list is 'A B C'
-after = $(shell echo $(space)$2$(space) | awk -F : '{if (match($$0,/ $1 /)) {print substr($$0,RSTART)}}')
-..._sipx_list = $(call after,$(PROJ),$(sipx))
-..._sipx_expanded = $(foreach T,$(..._sipx_list),$(subst $(PROJ),$(T),$*))
-..._lib_list = $(call after,$(PROJ),$(lib))
-..._lib_expanded = $(foreach T,$(..._lib_list),$(subst $(PROJ),$(T),$*))
-..._app_list = $(call after,$(PROJ),$(app))
-..._app_expanded = $(foreach T,$(..._app_list),$(subst $(PROJ),$(T),$*))
-
default-first-target : help;
sipx.% :
@@ -55,16 +44,6 @@ app.list lib.list sipx.list : %.list :
include $(sort $(wildcard mak/*.mk))
-help.*{1|2}*... = Perform all targets would normally follow the given target in addition to the target itself.\
- Very useful when you want to pick-up the build where it last stopped. For example 'make sipXthree...' would\
- expand to 'make sipXthree sipXfour sipXfive' but it would not include 'make sipXone sipXtwo'. You can use\
- the ... pattern anywhere you a specify a package name. Examples: 'make sipXconfig.rpm...',\
- 'make distro.centos-5-i386.OpenACD.rpm...'. See 'make sipx.list lib.list' for what the natural order of\
- packages.
-
-%... :
- $(MAKE) $(..._sipx_expanded) $(..._lib_expanded) $(..._app_expanded)
-
help-values.{1} = Any sipXecs package. For all sipXecs packages use 'sipx'. Complete list of sipXecs packages : $(sipx)
help-values.{2} = Any dependency package. For all dependencies use 'lib'. Complete list of dependencies : $(lib)
help-values.{6} = Any sipXecs application. For all app use 'app'. Complete list of app : $(app)
View
41 mak/build.mk.in
@@ -12,13 +12,14 @@ app :
$(MAKE) $(foreach P,$(app),$(P))
.PHONY:$(sipx) $(app)
-$(sipx) $(app) : % : mak/%-$(PACKAGE_VERSION)-$(PROJ_REVISION);
+.SECONDEXPANSION:
+$(sipx) $(app) : $$($$@_DEPS)
+ @echo "$$rm_on_deps_change" | bash
+ @if ! test -f $(PROJ)/.installed ; then \
+ $(MAKE) $@.build; \
+ touch $(PROJ)/.installed; \
+ fi
-mak/%-$(PACKAGE_VERSION)-$(PROJ_REVISION) :
- $(MAKE) $*.build
- touch $@
-
-$(foreach T,$(sipx) $(app),$(T)...) : %... : %.build...;
$(foreach T,$(sipx) $(app),$(T).build) : %.build : %.autoreconf %.configure %.all-install;
help.{1|6}.all-install=Run 'make all install' in each target
@@ -51,10 +52,36 @@ help.{1|2|6}.dist = Build archive, typically compressed tar
MAKE_COMMANDS = check install clean dist
$(foreach C,$(MAKE_COMMANDS) all,$(eval help.{1}.$(C)=Run make $(C) on each project))
$(foreach P,$(sipx) $(app),$(P).install) :; $(MAKE) -C $(PROJ) install
-$(foreach P,$(sipx) $(app),$(P).clean) :; $(MAKE) -C $(PROJ) clean
+$(foreach P,$(sipx) $(app),$(P).clean) :
+ $(MAKE) -C $(PROJ) clean
+ ! test -f $(PROJ)/.installed || rm $(PROJ)/.installed
+
$(foreach P,$(sipx) $(app),$(P).check) :; $(MAKE) -C $(PROJ) check
# projects do not all have an "all" target, they probably should, until then, use
# no-target default
$(foreach C,all,$(foreach T,$(sipx) $(app),$(T).all)) :
$(MAKE) -C $(PROJ)
+
+# This first checks if any files have changed in a project, if not, then
+# checks if any dependent projects were build since this project was
+# build. If so clear the build file
+define rm_on_deps_change
+ if test -f $(PROJ)/.installed ; then
+ x=`find $(SRC)/$(PROJ) -type f -newer $(PROJ)/.installed -printf .`
+ if [ -n "$$x" ] ; then
+ rm $(PROJ)/.installed
+ elif [ -n "$($@_DEPS)" ] ; then
+ for f in $(addprefix $(PROJ)/,$($@_DEPS=.installed)) ; do
+ if test -f $(PROJ)/.installed ; then
+ if test -f $$f ; then
+ if [ $$f -nt $(PROJ)/.installed ] ; then
+ rm $(PROJ)/.installed
+ fi
+ fi
+ fi
+ done
+ fi
+ fi
+endef
+export rm_on_deps_change
View
37 mak/modules.mk.in
@@ -4,6 +4,43 @@
# order is import for some of these as afar as building dependencies first
# consult spec files for authority on dependencies before changing the order
+deps = $(1) $($(1)_DEPS)
+
+sipXtackLib_DEPS = $(call deps,sipXportLib)
+sipXmediaLib_DEPS = $(call deps,sipXtackLib)
+sipXmediaAdapterLib_DEPS = $(call deps,sipXmediaLib)
+sipXcallLib_DEPS = $(call deps,sipXmediaAdapterLib)
+sipXsupervisor_DEPS =
+sipXmongo_DEPS = $(call deps,sipXsupervisor)
+sipXcommserverLib_DEPS = $(call deps,sipXsupervisor) $(call deps,sipXtackLib)
+sipXsqa_DEPS = $(call deps,sipXcommserverLib)
+sipXsnmp_DEPS = $(call deps,sipXsupervisor)
+sipXpostgres_DEPS = $(call deps,sipXsupervisor)
+sipXtunnel_DEPS = $(call deps,sipXsupervisor)
+sipXdns_DEPS = $(call deps,sipXsupervisor)
+sipXhttpd_DEPS = $(call deps,sipXsupervisor)
+sipXcommons_DEPS = $(call deps,sipXsupervisor)
+sipXrelay_DEPS = $(call deps,sipXcommserverLib) $(call deps,sipXcommons)
+sipXbridge_DEPS = $(call deps,sipXrelay)
+sipXfreeSwitch_DEPS = $(call deps,sipXcommserverLib)
+sipXcdr_DEPS = $(call deps,sipXcommserverLib)
+sipXacdStatistics_DEPS = $(call deps,sipXcommons)
+sipXconfig_DEPS = $(call deps,sipXcommons) $(call deps,sipXsupervisor)
+sipXopenfire_DEPS = $(call deps,sipXconfig)
+sipXcounterpath_DEPS = $(call deps,sipXconfig)
+sipXaudiocodes_DEPS = $(call deps,sipXconfig)
+sipXprompts_DEPS = $(call deps,sipXsupervisor)
+sipXivr_DEPS = $(call deps,sipXconfig)
+sipXproxy_DEPS = $(call deps,sipXcommserverLib)
+sipXpublisher_DEPS = $(call deps,sipXcommserverLib)
+sipXregistry_DEPS = $(call deps,sipXcommserverLib)
+sipXpark_DEPS = $(call deps,sipXcallLib) $(call deps,sipXcommserverLib)
+sipXpage_DEPS = $(call deps,sipXcommserverLib) $(call deps,sipXcommons)
+sipXpolycom_DEPS = $(call deps,sipXconfig)
+sipXrls_DEPS = $(call deps,sipXsqa) $(call deps,sipXcallLib) $(call deps,sipXcommserverLib)
+sipXsaa_DEPS = $(call deps,sipXcallLib)
+sipXrelease_DEPS =
+
sipx = \
sipXportLib \
sipXtackLib \

0 comments on commit 800b09e

Please sign in to comment.
Something went wrong with that request. Please try again.