
# Release file strings

RELEASE="configure/RELEASE"
EPICS_MAKEFILE="Makefile.epics"

ifeq ($(HOSTNAME),lcls-dev2)
	DEV_RELEASE_STRING=
	PROD_RELEASE_STRING=\\\#
else
	DEV_RELEASE_STRING=\\\#
	PROD_RELEASE_STRING=
endif



# Targets
.PHONY: all
all: $(RELEASE) mpsTdundToroids

$(RELEASE):
	sed "s/^DEV_RELEASE:/$(DEV_RELEASE_STRING)/;s/^PROD_RELEASE:/$(PROD_RELEASE_STRING)/" configure/RELEASE.common > $@

.PHONY: mpsTdundToroids
mpsTdundToroids: $(RELEASE)
	make -f $(EPICS_MAKEFILE)

.PHONY: run
run:
	cd iocBoot/sioc-mcc0-mp01 && ../../bin/linux-x86/mpsTdundAndToroidFaults st.cmd

.PHONY: clean
clean: $(RELEASE)
	make -f $(EPICS_MAKEFILE) clean
	-rm configure/RELEASE

.PHONY: distclean
distclean: $(RELEASE)
	make -f $(EPICS_MAKEFILE) distclean
	-rm configure/RELEASE

