Rewritten nested classes support

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@10225 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2001-06-21 12:18:51 +00:00
parent 052a18c8d8
commit 839b3a22ef
3 changed files with 49 additions and 41 deletions

View file

@ -1,3 +1,10 @@
Thu Jun 21 12:51:34 2001 Nicola Pero <nicola@brainstorm.co.uk>
* java.make (install-java_package), (internal-java_package-clean):
Fixed, simplified, and optimized management of nested classes.
* java-tool.make (install-java_tool), (internal-java_tool-clean),
(internal-java_tool-uninstall): Idem.
Thu Jun 21 10:13:55 2001 Nicola Pero <nicola@brainstorm.co.uk>
* rules.make (.PHONY): Fixed typo ('=' was used instead of ':')

View file

@ -97,25 +97,32 @@ $(GNUSTEP_INSTALLATION_DIR)/Tools/$(INTERNAL_java_tool_NAME):
> $(GNUSTEP_INSTALLATION_DIR)/Tools/$(INTERNAL_java_tool_NAME); \
chmod a+x $(GNUSTEP_INSTALLATION_DIR)/Tools/$(INTERNAL_java_tool_NAME);
# See java.make for comments on ADDITIONAL_JAVA_OBJ_FILES
UNESCAPED_ADD_JAVA_OBJ_FILES = $(wildcard $(JAVA_OBJ_FILES:.class=[$$]*.class))
ADDITIONAL_JAVA_OBJ_FILES = $(subst $$,\$$,$(UNESCAPED_ADD_JAVA_OBJ_FILES))
install-java_tool:: internal-install-java_tool-dirs \
$(GNUSTEP_INSTALLATION_DIR)/Tools/$(INTERNAL_java_tool_NAME)
if [ "$(JAVA_OBJ_FILES)" != "" ]; then \
for file in $(JAVA_OBJ_FILES) __done; do \
if [ $$file != __done ]; then \
$(INSTALL_DATA) $$file $(JAVA_TOOL_INSTALLATION_DIR)/$$file ; \
base=`dirname $$file`/`basename $$file .class` ; \
for sub in $${base}[$$]*.class __done; do \
if [ $$sub != __done ]; then \
$(INSTALL_DATA) $$sub $(JAVA_TOOL_INSTALLATION_DIR)/$$sub ; \
fi; \
done; \
fi; \
done; \
fi; \
if [ "$(ADDITIONAL_JAVA_OBJ_FILES)" != "" ]; then \
for file in $(ADDITIONAL_JAVA_OBJ_FILES) __done; do \
if [ $$file != __done ]; then \
$(INSTALL_DATA) $$file $(JAVA_TOOL_INSTALLATION_DIR)/$$file ; \
fi; \
done; \
fi
# TODO - uninstall nested/inner classes as well
# Warning - to uninstall nested classes you need to have a compiled
# source available ...
internal-java_tool-uninstall::
rm -f $(JAVA_TOOL_INSTALLATION_DIR)/$(JAVA_OBJ_FILES)
rm -f $(JAVA_TOOL_INSTALLATION_DIR)/$(ADDITIONAL_JAVA_OBJ_FILES)
rm -f $(GNUSTEP_INSTALLATION_DIR)/Tools/$(INTERNAL_java_tool_NAME)
#
@ -123,17 +130,7 @@ internal-java_tool-uninstall::
#
internal-java_tool-clean::
rm -f $(JAVA_OBJ_FILES)
for file in $(JAVA_OBJ_FILES) __done; do \
if [ $$file != __done ]; then \
base=`dirname $$file`/`basename $$file .class` ; \
for sub in $${base}[$$]*.class __done; do \
if [ $$sub != __done ]; then \
rm -f $$sub; \
fi; \
done; \
fi; \
done;
rm -f $(ADDITIONAL_JAVA_OBJ_FILES)
internal-java_tool-distclean::

View file

@ -133,36 +133,40 @@ $(_WE_INSTALL_INTO):
# as well. The fact we need to install these files is the reason why
# the following is more complicated than you would think at first
# glance.
# Build efficiently the list of possible inner/nested classes
# We first build a list like in `Pisa[$]*.class Roma[$]*.class' by
# taking the JAVA_OBJ_FILES and replacing .class with [$]*.class, then
# we use wildcard to get the list of all files matching the pattern
UNESCAPED_ADD_JAVA_OBJ_FILES = $(wildcard $(JAVA_OBJ_FILES:.class=[$$]*.class))
# Finally we need to escape the $s before passing the filenames to the
# shell
ADDITIONAL_JAVA_OBJ_FILES = $(subst $$,\$$,$(UNESCAPED_ADD_JAVA_OBJ_FILES))
install-java_package:: internal-install-java-dirs
if [ "$(JAVA_OBJ_FILES)" != "" ]; then \
for file in $(JAVA_OBJ_FILES) __done; do \
if [ $$file != __done ]; then \
$(INSTALL_DATA) $$file $(_WE_INSTALL_INTO)/$$file ; \
base=`dirname $$file`/`basename $$file .class` ; \
for sub in $${base}[$$]*.class __done; do \
if [ $$sub != __done ]; then \
$(INSTALL_DATA) $$sub $(_WE_INSTALL_INTO)/$$sub ; \
fi; \
done; \
fi; \
done; \
fi
if [ "$(JAVA_OBJ_FILES)" != "" ]; then \
for file in $(JAVA_OBJ_FILES) __done; do \
if [ $$file != __done ]; then \
$(INSTALL_DATA) $$file $(_WE_INSTALL_INTO)/$$file ; \
fi; \
done; \
fi; \
if [ "$(ADDITIONAL_JAVA_OBJ_FILES)" != "" ]; then \
for file in $(ADDITIONAL_JAVA_OBJ_FILES) __done; do \
if [ $$file != __done ]; then \
$(INSTALL_DATA) $$file $(_WE_INSTALL_INTO)/$$file ; \
fi; \
done; \
fi
#
# Cleaning targets
#
internal-java_package-clean::
rm -f $(JAVA_OBJ_FILES)
for file in $(JAVA_OBJ_FILES) __done; do \
if [ $$file != __done ]; then \
base=`dirname $$file`/`basename $$file .class` ; \
for sub in $${base}[$$]*.class __done; do \
if [ $$sub != __done ]; then \
rm -f $$sub; \
fi; \
done; \
fi; \
done;
rm -f $(ADDITIONAL_JAVA_OBJ_FILES)
rm -f $(JAVA_JNI_OBJ_FILES)
internal-java_package-distclean::