Skip to content

Commit

Permalink
additional work on lib deps stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
ezuce-admin committed Mar 1, 2013
1 parent 9fdf97a commit cc7e182
Show file tree
Hide file tree
Showing 27 changed files with 184 additions and 176 deletions.
3 changes: 1 addition & 2 deletions cfengine/.sipxecs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ cfengine_SOURCES = \
$(SRC)/$(PROJ)/cf-serverd \
$(SRC)/$(PROJ)/cf-execd

# targets not defined, nothing to do
cfengine.autoreconf cfengine.configure cfengine.dist :;
cfengine.dist :;
5 changes: 3 additions & 2 deletions config/lang.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
#
# Language utlity functions for projects building localization packages

include config/utility.am

# use lowercase and hyphens to be backward compatible with previous sipxecs versions
STDPROMPTS_LANG_ID = $(call lowercase,$(subst _,-,@LANG_ID@))

promptsdir = $(datadir)/www/doc/stdprompts_$(STDPROMPTS_LANG_ID)
confplugindir = @SIPX_JAVADIR@/sipXconfig/plugins
ivrplugindir = @SIPX_JAVADIR@/sipXivr

@PACKAGE@-dist-specfile :
@$(call SearchAndReplace,$(srcdir)/sipxlang-@[email protected],$(distdir)/sipxlang-@[email protected], $(dist_EXTRA_REPLACE))

sipxlang-%.jar :
jar -cf $@ -C $(srcdir)/sipxpbx .

Expand Down
2 changes: 0 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ m4_include([mak/centos-iso.m4])
m4_sinclude([custom/custom.m4])

AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([mak/00-modules.mk:mak/modules.mk.in])
AC_CONFIG_FILES([mak/01-app.mk:mak/app.mk.in])
AC_CONFIG_FILES([mak/05-build.mk:mak/build.mk.in])
AC_CONFIG_FILES([mak/20-list-dependencies.mk:mak/list-dependencies.mk.in])

Expand Down
3 changes: 1 addition & 2 deletions epel-release/.sipxecs.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
epel-release_SRPM=epel-release-6-5.src.rpm

# targets not defined, nothing to do
epel-release.autoreconf epel-release.configure epel-release.dist:;
epel-release.dist:;
2 changes: 1 addition & 1 deletion erlmongo/.sipxecs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ erlmongo_SOURCES = $(erlmongo_TARBALL)
erlmongo_SRPM = erlmongo-$(erlmongo_VER)-$(erlmongo_REV)$(RPM_DIST).src.rpm
erlmongo_TARBALL = erlmongo-$(erlmongo_VER).tar.gz

erlmongo.autoreconf erlmongo.configure erlmongo.dist:;
erlmongo.dist:;

# Helpful for package maintainer when you want to pull in new changes from erlmongo project
erlmongo.update_dist :
Expand Down
3 changes: 1 addition & 2 deletions hiredis/.sipxecs.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
hiredis_SRPM=hiredis-0.10.1-4.fc18.src.rpm

# targets not defined, nothing to do
hiredis.autoreconf hiredis.configure hiredis.dist:;
hiredis.dist:;
3 changes: 1 addition & 2 deletions js/.sipxecs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ js_SOURCES = js-1.7.0.tar.gz \
$(SRC)/$(PROJ)/js-perlconnect.patch \
$(SRC)/$(PROJ)/js-shlib.patch

# targets not defined, nothing to do
js.autoreconf js.configure js.dist:;
js.dist:;
13 changes: 13 additions & 0 deletions mak/OpenACD.sipxecs.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# See ./src/OpenACD.app.src for matching version number. Please keep in sync,
# but not strictly nec.
OpenACD_VER = 0.9.5

OpenACD_REV = $(shell cd $(SRC)/$(PROJ); ../config/revision-gen $(OpenACD_VER))
OpenACD_SRPM = openacd-$(OpenACD_VER)-$(OpenACD_REV).src.rpm
OpenACD_TAR = OpenACD/OpenACD.tar.gz
OpenACD_SRPM_DEFS = --define "buildno $(OpenACD_REV)"
OpenACD_RPM_DEFS = --define="buildno $(OpenACD_REV)"

OpenACD.dist :
test -d OpenACD || mkdir -p OpenACD
make -C $(SRC)/OpenACD dist DESTDIR=$(abspath .)/OpenACD/
52 changes: 0 additions & 52 deletions mak/app.mk.in

This file was deleted.

37 changes: 17 additions & 20 deletions mak/build.mk.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,17 @@
OPTIONS = @OPTIONS@
DOWNLOAD_LIB_CACHE = @DOWNLOAD_LIB_CACHE@

# pull in dependency make fragments
include $(SRC)/mak/modules.mk
include $(SRC)/mak/*.sipxecs.mk
include $(SRC)/*/.sipxecs.mk

help.sipx=Build all sipx components including targets autoreconf, configure, all and install targets
build sipx :
$(MAKE) $(foreach P,$(sipx),$(P))

help.app=Build all sipx apps including targets autoreconf, configure, all and install targets
app :
$(MAKE) $(foreach P,$(app),$(P))

# pull in dependency make fragments
include $(SRC)/*/.sipxecs.mk
include $(SRC)/mak/*.sipxecs.mk

# Only the main rpm
$(foreach P,$(sipx) $(app),$(eval $(P)_TAR = $(P)/$$(call lowercase,$(P))-$(PACKAGE_VERSION).tar.gz))
$(foreach P,$(sipx),$(eval $(P)_TAR = $(P)/$$(call lowercase,$(P))-$(PACKAGE_VERSION).tar.gz))

# Initialize submodules as we need them and only the specific submodule. This allows
# many submodules to be defined, but only requested submodules to be loaded. There
Expand All @@ -31,9 +28,9 @@ $(SRC)/%/.git :
git submodule init $*; \
git submodule update $*

.PHONY:$(sipx) $(app)
.PHONY:$(sipx)
.SECONDEXPANSION:
$(sipx) $(app) : $$($$@_DEPS) $$($$@_GIT_SUBMODULE)
$(sipx) : $$($$@_DEPS) $$($$@_GIT_SUBMODULE)
@echo "$$rm_on_deps_change" | \
DEP_TARGETS="$(addprefix $(PROJ)/,$($@_DEPS=.installed))" \
TARGET=$(PROJ)/.installed \
Expand All @@ -43,10 +40,10 @@ $(sipx) $(app) : $$($$@_DEPS) $$($$@_GIT_SUBMODULE)
touch $(PROJ)/.installed; \
fi

$(foreach T,$(sipx) $(app),$(T).build) : %.build : %.autoreconf %.configure %.all-install;
$(foreach T,$(sipx),$(T).build) : %.build : %.autoreconf %.configure %.all-install;

help.{1|6}.all-install=Run 'make all install' in each target
$(foreach T,$(sipx) $(app),$(T).all-install) : %.all-install : %.all %.install ;
$(foreach T,$(sipx),$(T).all-install) : %.all-install : %.all %.install ;

# Targets for sipx and lib. Uses pattern %.xyz so libs can implement their own
# implementation that will override the patterned one. i.e. freeswitch.autoreconf
Expand All @@ -58,7 +55,7 @@ help.{1|2|6}.autoreconf=Run autoreconf on each project
autoreconf -if

# TODO: Needs to support switching branches automatically
$(foreach P,$(sipx) $(app) $(lib),$(SRC)/$(P)) : $(SRC)/% :
$(foreach P,$(all),$(SRC)/$(P)) : $(SRC)/% :
git clone $($*_REPO) $*.git
mv $*.git $@

Expand All @@ -70,11 +67,11 @@ help.{1|2|6}.configure = Run configure on each project

.SECONDEXPANSION:
help.{1|2|6}.dist-only : Force a build of the archive (tarball) for this project
$(sipx:=.dist-only) $(app:=.dist-only) : %.dist-only : %.autoreconf %.configure %.dist_;
$(sipx:=.dist-only) : %.dist-only : %.autoreconf %.configure %.dist_;
%.dist_ :
$(MAKE) -C $(PROJ) dist
help.{1|2|6}.dist = Build archive, typically compressed tar
$(sipx:=.dist) $(app:=.dist): %.dist : $$(addsuffix .dist,$$(filter-out $$(lib_all),$$($$*_DEPS))) $$($$*_GIT_SUBMODULE)
$(sipx:=.dist): %.dist : $$(addsuffix .dist,$$(filter-out $$(lib_all),$$($$*_DEPS))) $$($$*_GIT_SUBMODULE)
@if test -f $($(PROJ)_TAR) ; then \
x=`find $(SRC)/$(PROJ)/ -type f \( \
-not -name configure \
Expand Down Expand Up @@ -102,16 +99,16 @@ $(sipx:=.dist) $(app:=.dist): %.dist : $$(addsuffix .dist,$$(filter-out $$(lib_a
# Targets for sipx only.
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) :
$(foreach P,$(sipx),$(P).install) :; $(MAKE) -C $(PROJ) install
$(foreach P,$(sipx),$(P).clean) :
$(MAKE) -C $(PROJ) clean
! test -f $(PROJ)/.installed || rm $(PROJ)/.installed

$(foreach P,$(sipx) $(app),$(P).check) :; $(MAKE) -C $(PROJ) check
$(foreach P,$(sipx),$(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)) :
$(foreach C,all,$(foreach T,$(sipx),$(T).all)) :
$(MAKE) -C $(PROJ)

# This first checks if any files have changed in a project, if not, then
Expand Down
3 changes: 3 additions & 0 deletions mak/homer.sipxecs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ homer_REV = 2
homer_SRPM = homer-$(homer_VER)-$(homer_REV)$(RPM_DIST).src.rpm
homer_SPEC = $(SRC)/$(PROJ)/homer.spec
homer_SOURCES = $(BUILDDIR)/$(PROJ)/homer-$(homer_VER).tar.gz

homer.dist : homer.autoreconf homer.configure homer.dist_

Loading

0 comments on commit cc7e182

Please sign in to comment.