################################################################################
# Master Makefile for TMS Sources
# T.Barnaby, BEAM Ltd, 2006-12-07
################################################################################
#
TOP = ${shell pwd}
include ${TOP}/Makefile.config
LDIRS = beam libTms
SDIRS = config tmsSigGen tmsStateGen tmsPuServer tmsServer tmsControl
SDIRS += tmsExamples tmsDevTest
DDIRS = datasrc
ADIRS = $(LDIRS) $(SDIRS) $(DDIRS)
SVNDIRS = $(LDIRS) $(SDIRS) $(DDIRS)
SVNROOT = file:///src/cern/SVN/tms
RPMS = tms-$(VERSION)-$(RELEASE).i386.rpm
.PHONY: all install clean includes depend
.PHONY: fresh checkout commit svnrelease svntag svnimport
.SUFFIXES: .spec -$(VERSION)-$(RELEASE).i386.rpm
.spec-$(VERSION)-$(RELEASE).i386.rpm:
rpmbuild -bb -D "version $(VERSION)" -D "release $(RELEASE)" $^
mv /scratch/rpms/RPMS/i386/$*-$(VERSION)-$(RELEASE).i386.rpm packages
all:
@(for f in $(LDIRS); do if !(make -C $$f all); then break; fi; done)
@(for f in $(SDIRS); do if !(make -C $$f all); then break; fi; done)
@(for f in $(DDIRS); do if !(make -C $$f all); then break; fi; done)
install:
@for f in $(ADIRS); do if ! (make -C $$f install); then break; fi; done
clean:
@(for f in $(ADIRS); do (make -C $$f clean); done)
includes:
@(for f in $(ADIRS); do (make -C $$f includes); done)
depend:
@(for f in $(ADIRS); do (make -C $$f depend); done)
fresh:
make clean includes depend all
#rpms: clean
rpms:
tar -czC .. -f /scratch/rpms/SOURCES/tms.tar.gz tms
rpmbuild -ba tms.spec
rpmsInstall:
cp /scratch/rpms/RPMS/i386/tms-*$(VERSION)-$(RELEASE)*.rpm ../packages
svnSetup:
# svnadmin create --fs-type fsfs /src/cern/SVN
# svn mkdir -m "First import." $(SVNROOT) $(SVNROOT)/design $(SVNROOT)/releases
svnImportAll:
# for f in $(SVNDIRS); do\
# (echo Dir: $$f;\
# svn mkdir -m "First import." $(SVNROOT)/$$f $(SVNROOT)/$$f/trunk $(SVNROOT)/$$f/tags $(SVNROOT)/$$f/branches;\
# svn import -m "First import." $$f $(SVNROOT)/$$f/trunk); done;
svnCheckoutAll:
for f in $(SVNDIRS); do (svn checkout $(SVNROOT)/$$f/trunk $$f); done;
svnList:
svn list $(SVNROOT)
svnListReleases:
svn list $(SVNROOT)/releases
svnCommit:
for f in $(SVNDIRS); do (echo Dir: $$f; cd $$f; svn commit); done;
svnRelease:
svn mkdir $(SVNROOT)/releases/release-$(VERSION) -m "Release"
for f in $(SVNDIRS); do (svn copy -m "Release" $(SVNROOT)/$$f $(SVNROOT)/releases/release-${VERSION}); done;
svnDiff:
for f in $(SVNDIRS); do (echo Dir: $$f; cd $$f; svn diff); done;