Files
pcas/configure/RULES_TOP
2009-06-26 20:37:22 +00:00

86 lines
3.4 KiB
Plaintext

#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE Versions 3.13.7
# and higher are distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
#
# $Id$
#
include $(CONFIG)/RULES_DIRS
UNINSTALL_DIRS += $(INSTALL_DBD) $(INSTALL_INCLUDE) $(INSTALL_DOC)\
$(INSTALL_HTML) $(INSTALL_JAVA) $(INSTALL_TEMPLATES) \
$(INSTALL_DB)
UNINSTALL_DIRS += $(DIRECTORY_TARGETS)
uninstallArchTargets = $(foreach arch,$(BUILD_ARCHS), uninstall$(DIVIDER)$(arch))
archPart = $(word 2, $(subst $(DIVIDER), ,$@))
$(uninstallArchTargets): uninstallDirs
@$(RMDIR) $(INSTALL_LOCATION_BIN)/$(archPart) $(INSTALL_LOCATION_LIB)/$(archPart)
cleandirs:
ifeq ($(wildcard $(INSTALL_LOCATION_BIN)/*),)
@$(RMDIR) $(INSTALL_LOCATION_BIN)
endif
ifeq ($(wildcard $(INSTALL_LOCATION_LIB)/*),)
@$(RMDIR) $(INSTALL_LOCATION_LIB)
endif
$(ECHO)
# The $(ECHO) above stops a "nothing to be done for cleandirs" message
distclean: realclean realuninstall
CVSCLEAN=$(firstword $(wildcard $(TOOLS)/cvsclean.pl $(TOP)/src/tools/cvsclean.pl))
cvsclean:
@$(PERL) $(CVSCLEAN)
realuninstall:
@$(RMDIR) $(INSTALL_LOCATION_BIN) $(INSTALL_LOCATION_LIB)
@$(RMDIR) $(UNINSTALL_DIRS)
uninstall: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS))
@$(MAKE) -f Makefile cleandirs
uninstallDirs:
@$(RMDIR) $(UNINSTALL_DIRS)
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 - Removes the O.<arch> dirs created by running make"
$(ECHO) " In O.<arch> dir, clean removes build created files"
$(ECHO) " realclean - Removes ALL O.<arch> dirs"
$(ECHO) " Cannot be used within an O.<arch> dir"
$(ECHO) " rebuild - Same as clean install"
$(ECHO) " inc - Installs header files"
$(ECHO) " build - Builds all targets"
$(ECHO) " archclean - Removes O.<arch> dirs but not O.Common dir"
$(ECHO) "\"Partial\" build targets supported by Makefiles:"
$(ECHO) " inc.<arch> - Installs <arch> only header files."
$(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) "Targets supported by top level Makefile:"
$(ECHO) " uninstall - Cleans directories created by the install."
$(ECHO) " realuninstall - Removes ALL install dirs"
$(ECHO) " distclean - Same as realclean realuninstall."
$(ECHO) " cvsclean - Removes cvs .#* files in all dirs of directory tree"
$(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 : $(uninstallArchTargets)
.PHONY : uninstall help cleandirs distclean uninstallDirs realuninstall
.PHONY : cvsclean