################################################################################
# Master Makefile for TMS Sources
# T.Barnaby, BEAM Ltd, 2006-12-07
# updated by D.Korchagin, CERN AB-BI-SW, 2007-08-31
################################################################################
#
TOP = .
include ${TOP}/Makefile.config
LDIRS = beam libTms
SDIRS = tmsExamples tmsControl
DDIRS =
ADIRS = $(LDIRS) $(SDIRS) $(DDIRS)
# Build System Settings
ifeq ("$(BUILD)", "CLIENT")
SDIRS += config tmsSigGen tmsStateGen tmsControlGui tmsDevTest tmsTestData
DDIRS += datasrc
endif
ifeq ("$(BUILD)", "FULL")
SDIRS += config tmsSigGen tmsStateGen tmsControlGui tmsDevTest tmsTestData
SDIRS += tmsPuServer tmsServer tmsWeb
DDIRS += datasrc
endif
SRC_LIB = tms/Readme tms/Makefile tms/Makefile.config tms/include tms/lib/$(CPU)
SRC_LIB += tms/beam tms/libTms
SRC_LIB += tms/tmsExamples tms/tmsControl
SRC_CLIENT = $(SRC_LIB) tms/config tms/tmsSigGen tms/tmsStateGen
SRC_CLIENT += tms/tmsControlGui tms/tmsDevTest tms/datasrc
SRC_FULL = $(SRC_CLIENT) tms/tmsPuServer tms/tmsServer tms/tmsWeb
SVNDIRS = build $(LDIRS) $(SDIRS) $(DDIRS)
SVNROOT = file:///src/cern/SVN/tms
.PHONY: all install clean includes #depend
.PHONY: fresh checkout commit svnrelease svntag svnimport
all: info
@(for f in $(ADIRS); 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
cp Makefile Makefile.config $(DEST_DIR)/$(PREFIX)
cp $(CPFLAGS) tmsExamples $(DEST_DIR)/$(PREFIX)
clean:
@(for f in $(ADIRS); do (make -C $$f clean); done)
rm -f tms-*.tar.gz
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 all #depend all
buildFiles:
cp $(CPFLAGS) Makefile Makefile.config tms.spec tms-client.spec Readme build
info:
echo "Build: ${BUILD}"
echo "Target: ${TARGET}"
################################################################################
# RPM package builds
################################################################################
#
#rpms: clean
rpms:
tar -czC .. -f /scratch/rpms/SOURCES/tms.tar.gz --exclude .svn tms
rpmbuild -ba -D "version $(VERSION)" -D "release $(RELEASE)" tms.spec
rpmsInstall:
cp /scratch/rpms/RPMS/i386/tms-*$(VERSION)-$(RELEASE)*.rpm ../packages
rpms-rh7:
tar -czC .. -f /scratch/rpms/SOURCES/tms.tar.gz --exclude .svn tms
rpmbuild -ba tms-client.spec
################################################################################
# Source package builds
################################################################################
#
tms-full-src:
tar -czf tms-full-src-$(VERSION).tar.gz --exclude .svn -C .. ${SRC_FULL}
tms-client-src:
tar -czf tms-client-$(VERSION).tar.gz --exclude .svn -C .. ${SRC_CLIENT}
tms-lib-src:
tar -czf tms-lib-src-$(VERSION).tar.gz --exclude .svn -C .. ${SRC_LIB}
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;