Files
pcas/configure/RULES_TOP
2000-06-20 19:04:21 +00:00

87 lines
3.1 KiB
Plaintext

#
# $Id$
#
include $(CONFIG)/RULES_DIRS
uninstall$(DIVIDER)%: uninstallDirs
@$(RMDIR) $(INSTALL_LOCATION_BIN)/$* $(INSTALL_LOCATION_LIB)/$*
cleandirs:
@echo " " #stops "nothing to be done for cleandirs" message
ifeq ($(wildcard $(INSTALL_LOCATION_BIN)/*),)
@$(RMDIR) $(INSTALL_LOCATION_BIN)
endif
ifeq ($(wildcard $(INSTALL_LOCATION_LIB)/*),)
@$(RMDIR) $(INSTALL_LOCATION_LIB)
endif
distclean: clean uninstall
uninstall: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS))
@$(MAKE) -f Makefile cleandirs
uninstallDirs:
@$(RMDIR) rec.bak rec
@$(RMDIR) $(INSTALL_DBD) $(INSTALL_INCLUDE) $(INSTALL_DOC)\
$(INSTALL_HTML) $(INSTALL_JAVA) $(INSTALL_TEMPLATES)
tar:
@DIRNAME=$(notdir $(shell pwd)); \
echo "TOP: Creating $$DIRNAME.tar file..."; \
ls Makefile* | xargs tar vcf $$DIRNAME.tar; \
if [ -f .current_rel_hist ]; then \
ls .current_rel_hist | xargs tar vrf $$DIRNAME.tar ; \
fi ;\
if [ -f EPICS_BASE ]; then \
ls EPICS_BASE | xargs tar vrf $$DIRNAME.tar ; \
fi ;\
for DIR in ${DIRS}; do \
find $${DIR} -name CVS -prune -o ! -type d -print \
| grep -v "/O\..*$$" | xargs tar vrf $$DIRNAME.tar; \
done
# tarVersion: Rule that runs from one level up, generates a temporary softlink
# sub-directory with version number, tars, gzips, and then removes the subdirectory.
# Usage: "gnumake tarVersion VERSION=1.2"
tarVersion:
@MODULE=$(notdir $(shell pwd)); \
TARNAME=$$MODULE-$(VERSION); \
TARFILE=$$MODULE/$$TARNAME.tar; \
echo "TOP: Creating $$TARNAME.tar file..."; \
cd ..; $(RM) $$TARNAME; ln -s $$MODULE $$TARNAME; \
ls $$TARNAME/READ* $$TARNAME/Makefile* | xargs tar vcf $$TARFILE; \
for DIR in ${DIRS}; do \
find $$TARNAME/$$DIR -name CVS -prune -o ! -type d -print \
| grep -v "/O\..*$$" | xargs tar vrf $$TARFILE; \
done; \
gzip -f $$TARFILE; \
$(RM) $$TARNAME
help:
@echo "Usage: gnumake [options] [target] ..."
@echo "Targets supported by all Makefiles:"
@echo " install - Builds and installs all targets (default rule)"
@echo " all - Same as install"
@echo " buildInstall - Same as install"
@echo " clean - Cleans objects. Clean removes the O.<arch> dirs"
@echo " in all except the O.<arch> level Makefile"
@echo " rebuild - Same as clean install"
@echo " depends - Generates include header file dependencies"
@echo " build - Builds all targets"
@echo "\"Partial\" build targets supported by Makefiles:"
@echo " install.<arch> - Builds and installs <arch> only."
@echo " clean.<arch> - Cleans <arch> binaries in O.<arch> dirs only."
@echo " build.<arch> - Builds <arch> only."
@echo " depends.<arch> - Generates <arch> dependencies only."
@echo "Targets supported by top level Makefile:"
@echo " uninstall - Cleans directories created by the install."
@echo " distclean - Same as clean uninstall."
@echo " tar - Create tar file "
@echo " help - Prints this list of valid make targets "
@echo "Indiv. object targets are supported by O.<arch> level Makefile .e.g"
@echo " xxxRecord.o"
.PHONY : uninstall tar help cleandirs distclean uninstallDirs