# topmost GNUmakefile for SoftRelTools # # author: AMJonckheere/FNAL 4-Feb-98 # based on the original BaBar version but putting most of the # real action into an include makefile fragment that can be changed. # This file should almost *never* need to change. SHELL = /bin/sh export PWD := $(shell /bin/pwd) export SRT_TOP := $(shell /bin/pwd) # set the correct BFCURRENT value newCURRENT := $(shell touch .current; cat .current) ifneq ($(newCURRENT),) # if the .current file exists in the release directory, use it ifneq ($(BFCURRENT),$(newCURRENT)) ERROR := $(shell echo This release based on $(shell cat .current), \ overriding BFCURRENT value of $(BFCURRENT) >& 2) endif override BFCURRENT := $(newCURRENT) export BFCURRENT endif # set CPPFLAGS so it can find the SoftRelTools include area override CPPFLAGS += -I$(SRT_TOP)/include ifdef BFCURRENT override CPPFLAGS += -I$(BFDIST)/releases/$(BFCURRENT)/include endif # now include the real toplevel GNUmakefile GMF_EXIST = $(shell if [ -f SoftRelTools/GNUmakefile.main ]; then echo YES; else echo NO; fi) ifeq (YES,$(GMF_EXIST)) include SoftRelTools/GNUmakefile.main override CPPFLAGS += $(DEFINES) else GMF_EXIST = $(shell if [ -f $(BFDIST)/releases/$(BFCURRENT)/SoftRelTools/GNUmakefile.main ]; then echo YES; else echo NO; fi) ifeq (YES,$(GMF_EXIST)) include $(BFDIST)/releases/$(BFCURRENT)/SoftRelTools/GNUmakefile.main override CPPFLAGS += $(DEFINES) else ERROR := $(shell echo This release does not have $(BFDIST)/releases/$(BFCURRENT)/SoftRelTools/GNUmakefile.main >& 2) endif endif