Fixed symlinks on windows

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@25903 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2008-01-09 15:55:08 +00:00
parent 13a2a4a44a
commit 71f4581d16
4 changed files with 18 additions and 8 deletions

View file

@ -1,3 +1,9 @@
2008-01-09 Nicola Pero <nicola.pero@meta-innovation.com>
* config.make.in (LN_S_RECURSIVE): New variable.
* Instance/application.make: Use it when symlinking a directory.
* Instance/framework.make: Same changes.
2008-01-08 Adam Fedor <fedor@gnu.org>
* Version 2.0.4 (on stable branch).

View file

@ -339,7 +339,7 @@ internal-install-app-wrapper: $(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_LDIR)
$(ECHO_NOTHING)\
cd $(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_LDIR); \
$(RM_LN_S) $(GNUSTEP_INSTANCE); \
$(LN_S) `$(REL_PATH_SCRIPT) $(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_LDIR) $(APP_INSTALL_DIR)/$(APP_FILE_NAME)` \
$(LN_S_RECURSIVE) `$(REL_PATH_SCRIPT) $(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_LDIR) $(APP_INSTALL_DIR)/$(APP_FILE_NAME)` \
$(GNUSTEP_INSTANCE)$(END_ECHO)
else
# Not sure that we can use relative paths with 'exec' in a portable

View file

@ -353,17 +353,17 @@ ifeq ($(FRAMEWORK_VERSION_SUPPORT), yes)
$(ECHO_NOTHING)cd $(FRAMEWORK_DIR); \
if [ ! -h "Resources" ]; then \
$(RM_LN_S) Resources; \
$(LN_S) Versions/Current/Resources Resources; \
$(LN_S_RECURSIVE) Versions/Current/Resources Resources; \
fi; \
if [ ! -h "Headers" ]; then \
$(RM_LN_S) Headers; \
$(LN_S) Versions/Current/Headers Headers; \
$(LN_S_RECURSIVE) Versions/Current/Headers Headers; \
fi$(END_ECHO)
endif
$(ECHO_NOTHING)cd $(DERIVED_SOURCES_DIR); \
if [ ! -h "$(HEADER_FILES_INSTALL_DIR)" ]; then \
$(RM_LN_S) ./$(HEADER_FILES_INSTALL_DIR); \
$(LN_S) ../$(FRAMEWORK_DIR_NAME)/Headers \
$(LN_S_RECURSIVE) ../$(FRAMEWORK_DIR_NAME)/Headers \
./$(HEADER_FILES_INSTALL_DIR); \
fi$(END_ECHO)
@ -589,7 +589,7 @@ ifeq ($(strip),yes)
endif
$(ECHO_INSTALLING_HEADERS)cd $(GNUSTEP_HEADERS); \
$(RM_LN_S) $(HEADER_FILES_INSTALL_DIR); \
$(LN_S) `$(REL_PATH_SCRIPT) $(GNUSTEP_HEADERS) $(FRAMEWORK_INSTALL_DIR)/$(FRAMEWORK_DIR_NAME)/Headers` $(HEADER_FILES_INSTALL_DIR); \
$(LN_S_RECURSIVE) `$(REL_PATH_SCRIPT) $(GNUSTEP_HEADERS) $(FRAMEWORK_INSTALL_DIR)/$(FRAMEWORK_DIR_NAME)/Headers` $(HEADER_FILES_INSTALL_DIR); \
$(END_ECHO)
ifneq ($(CHOWN_TO),)
$(ECHO_CHOWNING)cd $(GNUSTEP_HEADERS); \

View file

@ -61,8 +61,6 @@ ifeq (@target_os@,cygwin)
HAS_LN_S = no
endif
# This is used to remove an existing symlink before creating a new
# one. We don't trust 'ln -s -f' as it's unportable so we remove
# manually the existing symlink (if any) before creating a new one.
@ -70,12 +68,18 @@ endif
# if they are not, we assume they are copies (like cp -r) and we go
# heavy-handed with 'rm -Rf'. Note - this code might need rechecking
# for the case where LN_S = 'ln', if that ever happens on some
# platforms.
# platforms (it shouldn't cause any problems, but checking is good).
ifeq ($(HAS_LN_S), yes)
RM_LN_S = rm -f
LN_S_RECURSIVE = $(LN_S)
FRAMEWORK_VERSION_SUPPORT = yes
else
RM_LN_S = rm -Rf
# When symlinks are not available, using LN_S (which is set to 'cp -p')
# doesn't work on directories. So every time you want to do the
# equivalent of 'ln -s' on directories, you need to use
# LN_S_RECURSIVE instead of LN_S.
LN_S_RECURSIVE = cp -pR
FRAMEWORK_VERSION_SUPPORT = no
endif