use RULES_DIRS
This commit is contained in:
86
Makefile
86
Makefile
@@ -16,32 +16,19 @@
|
||||
TOP=.
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
all: install
|
||||
#
|
||||
# Directories to build defined in CONFIG_BASE
|
||||
#
|
||||
|
||||
build:
|
||||
@(for ARCH in ${BUILD_ARCHS}; do \
|
||||
${MAKE} $@.$${ARCH}; \
|
||||
done)
|
||||
include $(TOP)/config/RULES_DIRS
|
||||
|
||||
install:
|
||||
@(for ARCH in ${BUILD_ARCHS}; do \
|
||||
${MAKE} $@.$${ARCH}; \
|
||||
done)
|
||||
|
||||
depends:
|
||||
@(for ARCH in ${BUILD_ARCHS}; do \
|
||||
${MAKE} $@.$${ARCH}; \
|
||||
done)
|
||||
|
||||
clean:
|
||||
@(for ARCH in ${BUILD_ARCHS}; do \
|
||||
${MAKE} $@.$${ARCH}; \
|
||||
done)
|
||||
|
||||
uninstall:
|
||||
@(for ARCH in ${BUILD_ARCHS}; do \
|
||||
${MAKE} $@.$${ARCH}; \
|
||||
done)
|
||||
uninstall:: $(foreach arch, $(BUILD_ARCHS), $(arch)$(DIVIDER)uninstall)
|
||||
%$(DIVIDER)uninstall :
|
||||
@rm -rf $(INSTALL_LOCATION_BIN)/$* $(INSTALL_LOCATION_LIB)/$* \
|
||||
$(INSTALL_LOCATION)/dbd $(INSTALL_MAN) $(INSTALL_INCLUDE)
|
||||
@rm -rf rec.bak rec
|
||||
@DIR1=`pwd`;cd $(INSTALL_LOCATION);DIR2=`pwd`;cd $$DIR1;\
|
||||
if [ "$$DIR1" != "$$DIR2" ]; then rm -fr $(INSTALL_LOCATION)/config; fi
|
||||
|
||||
release:
|
||||
@echo TOP: Creating Release...
|
||||
@@ -51,54 +38,3 @@ built_release: install
|
||||
@echo TOP: Creating Fully Built Release...
|
||||
@./MakeRelease ${TOP} -b
|
||||
|
||||
# Notes for single architecture build rules:
|
||||
# CheckArch only has to be run for dirs.% . That
|
||||
# way it will only be run ONCE when filtering down
|
||||
# dependencies.
|
||||
#
|
||||
# CheckArch does not have to be run for cleans
|
||||
# because you might want to eliminate binaries for
|
||||
# an old architecture.
|
||||
|
||||
# DIRS RULE syntax: make depends.arch
|
||||
# e.g.: make depends.mv167
|
||||
#
|
||||
# Create dependencies for an architecture. We MUST
|
||||
# do this separately for each architecture because
|
||||
# some things may be included on a per architecture
|
||||
# basis.
|
||||
|
||||
build.%:
|
||||
@echo $*: Building
|
||||
@${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs build
|
||||
|
||||
install.%:
|
||||
@echo $*: Installing
|
||||
@${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs install
|
||||
|
||||
depends.%:
|
||||
@echo $*: Performing Make Depends
|
||||
@${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs depends
|
||||
|
||||
# Illegal Syntax
|
||||
|
||||
release.%:
|
||||
@echo
|
||||
@echo "The release.arch syntax is not supported by this build."
|
||||
@echo " Use 'make release' or 'make built_release' instead."
|
||||
@echo
|
||||
|
||||
uninstall.%:
|
||||
@echo "TOP: Uninstalling $* "
|
||||
@rm -rf $(INSTALL_LOCATION_BIN)/$* $(INSTALL_LOCATION_LIB)/$* \
|
||||
$(INSTALL_LOCATION)/dbd $(INSTALL_MAN) $(INSTALL_INCLUDE)
|
||||
@rm -rf rec.bak rec
|
||||
@DIR1=`pwd`;cd $(INSTALL_LOCATION);DIR2=`pwd`;cd $$DIR1;\
|
||||
if [ "$$DIR1" != "$$DIR2" ]; then rm -fr $(INSTALL_LOCATION)/config; fi
|
||||
|
||||
clean.%:
|
||||
@echo "TOP: Cleaning $* "
|
||||
@find src -type d -name "O.$*" -prune -exec rm -rf {} \;
|
||||
@find config -type d -name "O.$*" -prune -exec rm -rf {} \;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user