home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OpenStep 4.2J (Developer)
/
os42jdev.iso
/
NextDeveloper
/
Makefiles
/
pb_makefiles
/
prebuild.make
< prev
next >
Wrap
Text File
|
1996-12-05
|
4KB
|
122 lines
#
# prebuild.make
#
# Rules for preparing for a build. This preparation includes exporting
# any public, private, or project header files and ensuring that the
# object and generated-source directories exist.
#
# PUBLIC TARGETS
# prebuild: copies public and private header files to their
# final destination and refreshes precomps
#
# IMPORTED VARIABLES
# BEFORE_PREBUILD: targets to build before installing headers for a subproject
# AFTER_PREBUILD: targets to build after installing headers for a subproject
#
# EXPORTED VARIABLES
#
.PHONY: prebuild announce-prebuild local-prebuild recursive-prebuild
.PHONY: export-project-headers export-public-headers export-private-headers refresh-precomps
#
# Variable definitions
#
ACTUAL_PREBUILD = prebuild-directories export-java-classes export-project-headers export-public-headers export-private-headers
#
# First we do local prebuild, then we recurse, then we refresh precomps
#
ifneq "YES" "$(SUPPRESS_BUILD)"
prebuild: local-prebuild recursive-prebuild refresh-precomps
recursive-prebuild: $(ALL_SUBPROJECTS:%=prebuild@%) local-prebuild
$(ALL_SUBPROJECTS:%=prebuild@%): local-prebuild
endif
#
# Local prebuild
#
local-prebuild: announce-prebuild $(BEFORE_PREBUILD) $(ACTUAL_PREBUILD) $(AFTER_PREBUILD)
$(AFTER_PREBUILD): announce-prebuild $(BEFORE_PREBUILD) $(ACTUAL_PREBUILD)
$(ACTUAL_PREBUILD): announce-prebuild $(BEFORE_PREBUILD)
$(BEFORE_PREBUILD): announce-prebuild
#
# before we do anything we announce our intentions
#
announce-prebuild:
ifndef RECURSING
$(SILENT) $(ECHO) Pre-build setup...
else
$(SILENT) $(ECHO) $(RECURSIVE_ELLIPSIS)in $(NAME)
endif
#
# Ensure that important directories exist
#
prebuild-directories: $(OFILE_DIR) $(SFILE_DIR) $(PRODUCT_DIR)
#
# make sure everyone can see our .java's
#
export-java-classes:
ifeq "$(JAVA_ENABLED)" "YES"
$(JAVATOOL) $(OTHER_JAVATOOL_FLAGS) $(JAVAC_ARG) -newer -copy -java_src $(JAVA_SRC_DIR) -java_obj $(JAVA_OBJ_DIR) $(JAVA_CLASSES)
endif
#
# if there are any project headers we must export them
#
ifneq "" "$(PROJECT_HEADERS)$(OTHER_PROJECT_HEADERS)"
export-project-headers: $(PROJECT_HDR_DIR)$(PROJECT_HEADER_DIR_SUFFIX) $(PROJECT_HEADERS) $(OTHER_PROJECT_HEADERS)
$(SILENT) $(CLONEHDRS) $(PROJECT_HEADERS) $(OTHER_PROJECT_HEADERS) $(PROJECT_HDR_DIR)$(PROJECT_HEADER_DIR_SUFFIX)
endif
#
# if there are any public headers we must export them
#
ifneq "" "$(PUBLIC_HEADERS)$(OTHER_PUBLIC_HEADERS)"
ifneq "" "$(PUBLIC_HDR_DIR)"
export-public-headers: $(PUBLIC_HDR_DIR)$(PUBLIC_HEADER_DIR_SUFFIX) $(PUBLIC_HEADERS) $(OTHER_PUBLIC_HEADERS)
$(SILENT) $(CLONEHDRS) $(PUBLIC_HEADERS) $(OTHER_PUBLIC_HEADERS) $(PUBLIC_HDR_DIR)$(PUBLIC_HEADER_DIR_SUFFIX)
endif
endif
#
# if there are any private headers we must export them
#
ifneq "" "$(PRIVATE_HEADERS)$(OTHER_PRIVATE_HEADERS)"
ifneq "" "$(PRIVATE_HDR_DIR)"
export-private-headers: $(PRIVATE_HDR_DIR)$(PRIVATE_HEADER_DIR_SUFFIX) $(PRIVATE_HEADERS) $(OTHER_PRIVATE_HEADERS)
$(SILENT) $(CLONEHDRS) $(PRIVATE_HEADERS) $(OTHER_PRIVATE_HEADERS) $(PRIVATE_HDR_DIR)$(PRIVATE_HEADER_DIR_SUFFIX)
endif
endif
#
# Existing precomps must be kept up to date in case a contributing header file changes.
#
refresh-precomps:
ifeq "$(PLATFORM_OS)" "nextstep"
ifneq "" "$(ALL_PRECOMPS)"
$(SILENT) $(FIXPRECOMPS) -precomps $(ALL_PRECOMPS) -update $(ALL_PRECOMPFLAGS)
endif
endif
#
# rule for making various directories
#
$(OFILE_DIR) $(SFILE_DIR) $(PRODUCT_DIR) $(PROJECT_HDR_DIR)$(PROJECT_HEADER_DIR_SUFFIX) $(PUBLIC_HDR_DIR)$(PUBLIC_HEADER_DIR_SUFFIX) $(PRIVATE_HDR_DIR)$(PRIVAT_HEADER_DIR_SUFFIX):
$(SILENT) $(MKDIRS) $@