phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: packages do,1.1.1.1,1.2


From: Luca - De Whiskey's - De Vitis <address@hidden>
Subject: [Phpgroupware-cvs] CVS: packages do,1.1.1.1,1.2
Date: Tue, 25 Jun 2002 09:43:22 -0400

Update of /cvsroot/phpgroupware/packages
In directory subversions:/tmp/cvs-serv10239/packages

Modified Files:
        do 
Log Message:
- Changed all the occurencies of SED with SEDN and sed with SED.
- Removed the debian path from EXCLUDED_SOURCE_FILES.
- Removed the REQUIRED_COMMANDS and the implicit checks on all the commands
  - Added the requirement function.
  - Added requirement target for each package format (each target uses the
    requirement function).
  - Each package format target now depends on its requirement target.
- Added the compile target.
  - Remove the dependencies on the sgml files compilation from all the
    targets.
- Renamed MODULE_ALL_BUILDED in ALL_BUILDED.
- Made build target depends on $(PACKAGES) instead of $(MODULES).


Index: do
===================================================================
RCS file: /cvsroot/phpgroupware/packages/do,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** do  24 Jun 2002 19:08:50 -0000      1.1.1.1
--- do  25 Jun 2002 13:43:19 -0000      1.2
***************
*** 41,48 ****
  MODULES := $(shell find $(MODULES_PATHS) -printf "%f ") 
  
! EXCLUDED_SOURCE_FILES = -name \*.sgml -or -path \*debian\* -or $(CVS)
  SOURCE_FILES = -type f -not \( $(EXCLUDED_SOURCE_FILES) \)
  
! VERSION := $(shell $(SED) 's/\$Name: \([^ ]\+\)/\1/p' < packages/version)
  ifndef VERSION
  VERSION := $(shell date +"%Y%m%d")
--- 41,48 ----
  MODULES := $(shell find $(MODULES_PATHS) -printf "%f ") 
  
! EXCLUDED_SOURCE_FILES = -name \*.sgml -or $(CVS)
  SOURCE_FILES = -type f -not \( $(EXCLUDED_SOURCE_FILES) \)
  
! VERSION := $(shell $(SEDN) 's/\$Name: \([^ ]\+\)/\1/p' < packages/version)
  ifndef VERSION
  VERSION := $(shell date +"%Y%m%d")
***************
*** 55,70 ****
  
  # 
-----------------------------------------------------------------------------
- # Checks for required commands.
- # 
-----------------------------------------------------------------------------
- REQUIRED_COMMANDS = bzip2 alien sgmltools fakeroot dpkg-parsechangelog
- $(foreach command, $(subst -,_, $(REQUIRED_COMMANDS)), \
-       $(if $($(command)), \
-       , \
-               $(error Command not found: `$(subst _,-,$(command))') \
-       ) \
- )
- # 
-----------------------------------------------------------------------------
- 
- # 
-----------------------------------------------------------------------------
  # Documents backends and extensions.
  # 
-----------------------------------------------------------------------------
--- 55,58 ----
***************
*** 100,117 ****
  # 
-----------------------------------------------------------------------------
  
! MODULE_ALL_BUILDED = $(patsubst %,\%.%.builded,$(PACKAGES))
  
! build: $(MODULES)
  
  $(MODULES): % : %.all.builded
  
! $(MODULES:%=%.all.builded): %.all.builded : $(MODULE_ALL_BUILDED)
  
  # 
-----------------------------------------------------------------------------
! # Specific variable and targets to build source files (SGML documents, by now)
  # 
-----------------------------------------------------------------------------
  
  $(MODULES:%=%.source.files.compiled): \
! %.source.files.compiled : %.source.files.sgml %.source.files
        for sgml in $(shell cat $(@:compiled=sgml)) ; do \
                for backend in $(BACKENDS) ; do \
--- 88,141 ----
  # 
-----------------------------------------------------------------------------
  
! build: $(PACKAGES)
  
! $(PACKAGES): % : $(foreach module,$(MODULES),$(module).%.builded)
! 
! ALL_BUILDED = $(foreach package,$(PACKAGES),%.$(package).builded)
  
  $(MODULES): % : %.all.builded
  
! $(MODULES:%=%.all.builded): %.all.builded : requirements $(ALL_BUILDED)
  
  # 
-----------------------------------------------------------------------------
! # Rules to check requirements
  # 
-----------------------------------------------------------------------------
+ require = $(foreach command,$(subst -,_,$(1)), \
+       $(if $($(command)), \
+               touch $(@) ; \
+       , \
+               $(error Command not found: `$(1)') \
+       ) \
+ )
+ 
+ requirements: $(PACKAGES:%=%.requirements)
+ 
+ default.requirements:
+       $(call require,sgmltools dpkg-parsechangelog)
+ 
+ tar.gz.requirements: default.requirements
+       $(call require,tar gzip)
+ 
+ tar.bz2.requirements: default.requirements
+       $(call require,tar bzip2)
+ 
+ orig.tar.gz.requirements: tar.gz.requirements
+       $(call require,find install)
+ 
+ deb.requirements: orig.tar.gz.requirements
+       $(call require,fakeroot dch)
+ 
+ $(foreach format,rpm tgz slp,$(format).requirements): deb.requirements
+       $(call require,alien)
+ # 
-----------------------------------------------------------------------------
+ 
+ # 
-----------------------------------------------------------------------------
+ # Specific variable and targets to compile source files (SGML documents)
+ # 
-----------------------------------------------------------------------------
+ 
+ compile: $(MODULES:%=%.source.files.compiled)
  
  $(MODULES:%=%.source.files.compiled): \
!       %.source.files.compiled : %.source.files.sgml %.source.files
        for sgml in $(shell cat $(@:compiled=sgml)) ; do \
                for backend in $(BACKENDS) ; do \
***************
*** 132,136 ****
        $(if $(CHANGELOG_VERSION), \
                cd $(@:.source.version=) && \
!                       $(DPKG_PARSECHANGELOG) | $(SED) $(CHANGELOG_VERSION) > 
../$(@) \
        , \
                echo $(VERSION) > $(@) \
--- 156,160 ----
        $(if $(CHANGELOG_VERSION), \
                cd $(@:.source.version=) && \
!                       $(DPKG_PARSECHANGELOG) | $(SEDN) $(CHANGELOG_VERSION) > 
../$(@) \
        , \
                echo $(VERSION) > $(@) \
***************
*** 142,150 ****
  # 
-----------------------------------------------------------------------------
  TAR_GZ_ARCHIVES = %-$(VERSION).tar.gz
  
  $(MODULES:%=%.tar.gz.builded): %.tar.gz.builded : $(TAR_GZ_ARCHIVES)
!       echo $(@:%.tar.gz.builded=$(TAR_GZ_ARCHIVES)) | tee $(@)
  
! $(MODULES:%=$(TAR_GZ_ARCHIVES)): $(TAR_GZ_ARCHIVES) : %.source.files.compiled
        $(TAR) --files-from $(@:$(TAR_GZ_ARCHIVES)=%.source.files) | \
                $(GZIP) > $(@)
--- 166,175 ----
  # 
-----------------------------------------------------------------------------
  TAR_GZ_ARCHIVES = %-$(VERSION).tar.gz
+ TAR_GZ_REQUIRED = tar.gz.requirements %.source.files
  
  $(MODULES:%=%.tar.gz.builded): %.tar.gz.builded : $(TAR_GZ_ARCHIVES)
!       echo $(@:%.tar.gz.builded=$(TAR_GZ_ARCHIVES)) > $(@)
  
! $(MODULES:%=$(TAR_GZ_ARCHIVES)): $(TAR_GZ_ARCHIVES) : $(TAR_GZ_REQUIRED)
        $(TAR) --files-from $(@:$(TAR_GZ_ARCHIVES)=%.source.files) | \
                $(GZIP) > $(@)
***************
*** 155,163 ****
  # 
-----------------------------------------------------------------------------
  TAR_BZ2_ARCHIVES = %-$(VERSION).tar.bz2
  
  $(MODULES:%=%.tar.bz2.builded): %.tar.bz2.builded : $(TAR_BZ2_ARCHIVES)
!       echo $(@:%.tar.bz2.builded=$(TAR_BZ2_ARCHIVES)) | tee $(@)
  
! $(MODULES:%=$(TAR_BZ2_ARCHIVES)): $(TAR_BZ2_ARCHIVES) : 
%.source.files.compiled
        $(TAR) --files-from $(@:$(TAR_BZ2_ARCHIVES)=%.source.files) | \
                $(BZIP2) > $(@)
--- 180,189 ----
  # 
-----------------------------------------------------------------------------
  TAR_BZ2_ARCHIVES = %-$(VERSION).tar.bz2
+ TAR_BZ2_REQUIRED = tar.bz2.requirements %.source.files
  
  $(MODULES:%=%.tar.bz2.builded): %.tar.bz2.builded : $(TAR_BZ2_ARCHIVES)
!       echo $(@:%.tar.bz2.builded=$(TAR_BZ2_ARCHIVES)) > $(@)
  
! $(MODULES:%=$(TAR_BZ2_ARCHIVES)): $(TAR_BZ2_ARCHIVES) : $(TAR_BZ2_REQUIRED)
        $(TAR) --files-from $(@:$(TAR_BZ2_ARCHIVES)=%.source.files) | \
                $(BZIP2) > $(@)
***************
*** 168,175 ****
  # 
-----------------------------------------------------------------------------
  ORIG_BUILDED = .orig.tar.gz.builded
! ORIG_DEPENDS = %.source.clean %.source.version
  ORIG_MODULE = $(@:$(ORIG_BUILDED)=)
  ORIG_VERSION = \
!       $(shell $(SED) $(UPSTREAM_VERSION) < 
$(@:$(ORIG_BUILDED)=.source.version))
  ORIG_PACKAGE_NAME = $(subst _,-,$(ORIG_MODULE))
  ORIG_SUORCE_DIRECTORY = $(ORIG_PACKAGE_NAME)-$(ORIG_VERSION).orig
--- 194,201 ----
  # 
-----------------------------------------------------------------------------
  ORIG_BUILDED = .orig.tar.gz.builded
! ORIG_REQUIRED = orig.tar.gz.requirements %.source.clean %.source.version
  ORIG_MODULE = $(@:$(ORIG_BUILDED)=)
  ORIG_VERSION = \
!       $(shell $(SEDN) $(UPSTREAM_VERSION) < 
$(@:$(ORIG_BUILDED)=.source.version))
  ORIG_PACKAGE_NAME = $(subst _,-,$(ORIG_MODULE))
  ORIG_SUORCE_DIRECTORY = $(ORIG_PACKAGE_NAME)-$(ORIG_VERSION).orig
***************
*** 177,181 ****
  ORIG_TAR_GZ = $(ORIG_PACKAGE_NAME)_$(ORIG_VERSION).orig.tar.gz
  
! $(MODULES:%=%$(ORIG_BUILDED)): %$(ORIG_BUILDED) : $(ORIG_DEPENDS)
        cd $(ORIG_MODULE) && find $(SOURCE_FILES) -exec \
                $(INSTALL) {} ../$(ORIG_BUILD_DIRECTORY)/{} \; 
--- 203,207 ----
  ORIG_TAR_GZ = $(ORIG_PACKAGE_NAME)_$(ORIG_VERSION).orig.tar.gz
  
! $(MODULES:%=%$(ORIG_BUILDED)): %$(ORIG_BUILDED) : $(ORIG_REQUIRED)
        cd $(ORIG_MODULE) && find $(SOURCE_FILES) -exec \
                $(INSTALL) {} ../$(ORIG_BUILD_DIRECTORY)/{} \; 
***************
*** 191,199 ****
  ifdef CHANGELOG_VERSION
  DEB_VERSION = $(shell cat $(@:.deb.builded=.source.version))
! DEB_UPSTREAM_VERSION = $(shell echo $(DEB_VERSION) | $(SED) 
$(UPSTREAM_VERSION))
  DEB_NEW_VERSION = $(DEB_VERSION).$(VERSION)
  else
  DEB_VERSION = \
!       $(shell $(SED) $(UPSTREAM_VERSION) < $(@:.deb.builded=.source.version))
  DEB_NEW_VERSION = $(DEB_VERSION)-0
  endif
--- 217,225 ----
  ifdef CHANGELOG_VERSION
  DEB_VERSION = $(shell cat $(@:.deb.builded=.source.version))
! DEB_UPSTREAM_VERSION = $(shell echo $(DEB_VERSION) | $(SEDN) 
$(UPSTREAM_VERSION))
  DEB_NEW_VERSION = $(DEB_VERSION).$(VERSION)
  else
  DEB_VERSION = \
!       $(shell $(SEDN) $(UPSTREAM_VERSION) < $(@:.deb.builded=.source.version))
  DEB_NEW_VERSION = $(DEB_VERSION)-0
  endif
***************
*** 205,209 ****
  DEB_FILES = -type f -not \( $(CVS) \)
  
! $(MODULES:%=%.deb.builded): %.deb.builded : %.source.clean %.source.version
        cd $(@:.deb.builded=) && find $(DEB_FILES) \
                -exec $(INSTALL) {} ../$(DEB_BUILD_DIRECTORY)/{} \;
--- 231,237 ----
  DEB_FILES = -type f -not \( $(CVS) \)
  
! DEB_REQUIRED = deb.requirements %.source.clean %.source.version
! 
! $(MODULES:%=%.deb.builded): %.deb.builded : $(DEB_REQUIRED)
        cd $(@:.deb.builded=) && find $(DEB_FILES) \
                -exec $(INSTALL) {} ../$(DEB_BUILD_DIRECTORY)/{} \;
***************
*** 214,218 ****
        cd $(DEB_BUILD_DIRECTORY) && $(DEBIAN_RULES) binary 
        $(RM) $(@)
!       for package in $$($(SED) $(DEB_LIST) < $(DEB_BUILDED)) ; do \
                $(MV) $(BUILD_DIRECTORY)/$${package} . && \
                echo $${package} >> $(@) ;\
--- 242,246 ----
        cd $(DEB_BUILD_DIRECTORY) && $(DEBIAN_RULES) binary 
        $(RM) $(@)
!       for package in $$($(SEDN) $(DEB_LIST) < $(DEB_BUILDED)) ; do \
                $(MV) $(BUILD_DIRECTORY)/$${package} . && \
                echo $${package} >> $(@) ;\
***************
*** 222,231 ****
  COMPILED = 's/^\([^ ]\+\).*$$/\1/p'
  compiled = \
!       $(ALIEN) --to-$(2) $(shell cat $(1).deb.builded) | $(SED) $(COMPILED)
  
  # 
-----------------------------------------------------------------------------
  # Specific variables and targets to build .rpm packages.
  # 
-----------------------------------------------------------------------------
! $(MODULES:%=%.rpm.builded): %.rpm.builded : %.deb.builded
        $(call compiled,$(@:.rpm.builded=),rpm) > $(@)
  # 
-----------------------------------------------------------------------------
--- 250,259 ----
  COMPILED = 's/^\([^ ]\+\).*$$/\1/p'
  compiled = \
!       $(ALIEN) --to-$(2) $(shell cat $(1).deb.builded) | $(SEDN) $(COMPILED)
  
  # 
-----------------------------------------------------------------------------
  # Specific variables and targets to build .rpm packages.
  # 
-----------------------------------------------------------------------------
! $(MODULES:%=%.rpm.builded): %.rpm.builded : rpm.requirements %.deb.builded
        $(call compiled,$(@:.rpm.builded=),rpm) > $(@)
  # 
-----------------------------------------------------------------------------
***************
*** 234,238 ****
  # Specific variables and targets to build .tgz packages.
  # 
-----------------------------------------------------------------------------
! $(MODULES:%=%.tgz.builded): %.tgz.builded : %.deb.builded
        $(call compiled,$(@:.tgz.builded=),tgz) > $(@)
  # 
-----------------------------------------------------------------------------
--- 262,266 ----
  # Specific variables and targets to build .tgz packages.
  # 
-----------------------------------------------------------------------------
! $(MODULES:%=%.tgz.builded): %.tgz.builded : tgz.requirements %.deb.builded
        $(call compiled,$(@:.tgz.builded=),tgz) > $(@)
  # 
-----------------------------------------------------------------------------
***************
*** 241,245 ****
  # Specific variables and targets to build .slp packages.
  # 
-----------------------------------------------------------------------------
! $(MODULES:%=%.slp.builded): %.slp.builded : %.deb.builded
        $(call compiled,$(@:.slp.builded=),slp) > $(@)
  # 
-----------------------------------------------------------------------------
--- 269,273 ----
  # Specific variables and targets to build .slp packages.
  # 
-----------------------------------------------------------------------------
! $(MODULES:%=%.slp.builded): %.slp.builded : slp.requirements %.deb.builded
        $(call compiled,$(@:.slp.builded=),slp) > $(@)
  # 
-----------------------------------------------------------------------------
***************
*** 248,252 ****
  # Specific variables and targets to build .pkg packages.
  # 
-----------------------------------------------------------------------------
! $(MODULES:%=%.pkg.builded): %.pkg.builded : %.deb.builded
        $(call compiled,pkg) > $(@)
  # 
-----------------------------------------------------------------------------
--- 276,280 ----
  # Specific variables and targets to build .pkg packages.
  # 
-----------------------------------------------------------------------------
! $(MODULES:%=%.pkg.builded): %.pkg.builded : pkg.required %.deb.builded
        $(call compiled,pkg) > $(@)
  # 
-----------------------------------------------------------------------------
***************
*** 268,272 ****
  
  CORE_BUILD_DIRECTORY = $(BUILD_DIRECTORY)/core
! CORE_ARCHIVES = core-$(VERSION).tar.%
  CORE_PACKAGES := $(patsubst %,$(CORE_ARCHIVES),gz bz2)
  CORE_SOURCES = phpgroupware $(CORE_MODULES)
--- 296,300 ----
  
  CORE_BUILD_DIRECTORY = $(BUILD_DIRECTORY)/core
! CORE_ARCHIVES = phpgroupware-core-$(VERSION).tar.%
  CORE_PACKAGES := $(patsubst %,$(CORE_ARCHIVES),gz bz2)
  CORE_SOURCES = phpgroupware $(CORE_MODULES)
***************
*** 281,289 ****
        echo $(^) > $(@)
  
! $(CORE_PACKAGES): core.source.files
        $(TAR) -C $(CORE_BUILD_DIRECTORY) phpgroupware | \
                $($(@:core-$(VERSION).tar.=)) >> $(@)
  
! core.source.files: $(CORE_SOURCES_COMPILED)
        find phpgroupware $(SOURCE_FILES) \
                -exec $(INSTALL) {} $(CORE_BUILD_DIRECTORY)/{} \;
--- 309,317 ----
        echo $(^) > $(@)
  
! $(CORE_PACKAGES): tar.gz.requirements tar.bz2.requirements core.source.files
        $(TAR) -C $(CORE_BUILD_DIRECTORY) phpgroupware | \
                $($(@:core-$(VERSION).tar.=)) >> $(@)
  
! core.source.files: # $(CORE_SOURCES_COMPILED)
        find phpgroupware $(SOURCE_FILES) \
                -exec $(INSTALL) {} $(CORE_BUILD_DIRECTORY)/{} \;
***************
*** 294,315 ****
  
  # 
-----------------------------------------------------------------------------
- # The clean target.
- # 
-----------------------------------------------------------------------------
- $(MODULES:%=%.source.clean):
-       if test -f $(@:clean=files.compiled) ; then \
-               cat $(@:clean=files.compiled) | xargs $(RM) ;\
-       fi
- 
- clean: $(MODULES:%=%.source.clean)
-       for list in $(wildcard *.builded) ; do \
-               cat $${list} | xargs $(RM) ;\
-       done
-       -$(RM) *.lint.*
-       -$(RM) *.builded
-       -$(RM) *.source.*
-       -$(RM) -r $(BUILD_DIRECTORY)
- # 
-----------------------------------------------------------------------------
- 
- # 
-----------------------------------------------------------------------------
  # The release target.
  # 
-----------------------------------------------------------------------------
--- 322,325 ----
***************
*** 317,321 ****
        for format in $(PACKAGES) ; do \
                cat *.$${format}.builded | while read file ; do \
!                       $(INSTALL) $${file} $(INSTALL_DIRECTORY)/$${format} \
                done ;\
        done
--- 327,331 ----
        for format in $(PACKAGES) ; do \
                cat *.$${format}.builded | while read file ; do \
!                       $(INSTALL) $${file} $(RELEASE_DIRECTORY)/$${format} \
                done ;\
        done
***************
*** 346,350 ****
        for check in $(CHECKS) ; do \
                if test -s $(@:report=)$${check} ; then \
!                       $(sed) $(LINT_INFOS) < \
                                packages/lint/infos/$${check}.info >> $(@) ;\
                fi ;\
--- 356,360 ----
        for check in $(CHECKS) ; do \
                if test -s $(@:report=)$${check} ; then \
!                       $(SED) $(LINT_INFOS) < \
                                packages/lint/infos/$${check}.info >> $(@) ;\
                fi ;\
***************
*** 353,355 ****
  # 
-----------------------------------------------------------------------------
  
! .PHONY: build clean release install lint core $(MODULES)
--- 363,385 ----
  # 
-----------------------------------------------------------------------------
  
! # 
-----------------------------------------------------------------------------
! # The clean target.
! # 
-----------------------------------------------------------------------------
! $(MODULES:%=%.source.clean):
!       if test -f $(@:clean=files.compiled) ; then \
!               cat $(@:clean=files.compiled) | xargs $(RM) ;\
!       fi
!       touch $(@)
! 
! clean: $(MODULES:%=%.source.clean)
!       for list in $(wildcard *.builded) ; do \
!               cat $${list} | xargs $(RM) ;\
!       done
!       -$(RM) *.requirements
!       -$(RM) *.lint.*
!       -$(RM) *.builded
!       -$(RM) *.source.*
!       -$(RM) --recursive $(BUILD_DIRECTORY)
! # 
-----------------------------------------------------------------------------
! 
! .PHONY: build compile clean release install lint core $(MODULES) $(PACKAGES)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]