Always use 'app' and 'gswa' as app extensions ... that is, use Gorm.app and drop Gorm.debug and Gorm.profile. Also, print a friendly message when openapp fails because . is not in PATH

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@23471 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2006-09-12 19:05:58 +00:00
parent 997f53e991
commit 36d4378319
7 changed files with 52 additions and 67 deletions

View file

@ -1,3 +1,27 @@
2006-09-12 Nicola Pero <nicola.pero@meta-innovation.com>
All applications now use the '.app' extension no matter how they
are compiled. So, no more Gorm.debug and Gorm.profile; it will
always be Gorm.app.
* common.make (APP_EXTENSION): Always use 'app' as the app extension.
* Instance/gswapp.make (GSWAPP_EXTENSION): Always use 'gswa' as
the app extension.
* Master/gswapp.make (GSWAPP_EXTENSION): Same change.
* Master/application.make (internal-distclean): Do not delete *.profile
and *.debug.
* Master/gswapp.make (internal-distclean): Same change.
* Master/test-application.make (internal-distclean): Same change.
* openapp.in: Do not search for xxx.debug and xxx.profile; only
search for xxx.app.
* openapp.in: If we find the application in '.', but we don't run
it because '.' is not in the PATH, print an explanation/warning
and suggest the user uses 'openapp ./xxx' if they really want to
run it.
2006-09-08 Nicola Pero <nicola.pero@meta-innovation.com>
Removed the code to automatically move from the very very old

View file

@ -45,15 +45,7 @@ endif
# where xxx is the application name <==
# Determine the application directory extension
ifeq ($(profile), yes)
GSWAPP_EXTENSION = profile
else
ifeq ($(debug), yes)
GSWAPP_EXTENSION = debug
else
GSWAPP_EXTENSION = gswa
endif
endif
GSWAPP_EXTENSION = gswa
GNUSTEP_GSWAPPS = $(GNUSTEP_INSTALLATION_DIR)/GSWApps

View file

@ -53,7 +53,7 @@ else
endif
internal-distclean::
(cd $(GNUSTEP_BUILD_DIR); rm -rf obj *.app *.debug *.profile)
(cd $(GNUSTEP_BUILD_DIR); rm -rf obj *.app)
# The following make trick extracts all tools in APP_NAME for which
# the xxx_SUBPROJECTS variable is set to something non-empty.

View file

@ -27,15 +27,7 @@ include $(GNUSTEP_MAKEFILES)/rules.make
endif
# Determine the application directory extension
ifeq ($(profile), yes)
GSWAPP_EXTENSION=profile
else
ifeq ($(debug), yes)
GSWAPP_EXTENSION=debug
else
GSWAPP_EXTENSION=gswa
endif
endif
GSWAPP_EXTENSION=gswa
GSWAPP_NAME := $(strip $(GSWAPP_NAME))
@ -56,7 +48,7 @@ else
endif
internal-distclean::
(cd $(GNUSTEP_BUILD_DIR); rm -rf obj *.gswa *.debug *.profile)
(cd $(GNUSTEP_BUILD_DIR); rm -rf obj *.gswa)
GSWAPPS_WITH_SUBPROJECTS = $(strip $(foreach gswapp,$(GSWAPP_NAME),$(patsubst %,$(gswapp),$($(gswapp)_SUBPROJECTS))))
ifneq ($(GSWAPPS_WITH_SUBPROJECTS),)

View file

@ -44,7 +44,7 @@ else
endif
internal-distclean::
(cd $(GNUSTEP_BUILD_DIR); rm -rf obj *.app *.debug *.profile)
(cd $(GNUSTEP_BUILD_DIR); rm -rf obj *.app)
TEST_APPS_WITH_SUBPROJECTS = $(strip $(foreach test-app,$(TEST_APP_NAME),$(patsubst %,$(test-app),$($(test-app)_SUBPROJECTS))))
ifneq ($(TEST_APPS_WITH_SUBPROJECTS),)

View file

@ -547,15 +547,7 @@ endif
# GNUmakefile, the user can override these variables by setting them
# in the GNUmakefile.
BUNDLE_EXTENSION = .bundle
ifeq ($(profile), yes)
APP_EXTENSION = profile
else
ifeq ($(debug), yes)
APP_EXTENSION = debug
else
APP_EXTENSION = app
endif
endif
APP_EXTENSION = app

View file

@ -75,69 +75,54 @@ esac
# Remove leading slashes at the end of the application name
app="`echo \"$app\" | sed 's%/*$%%'`"
# Now form the set of directory names we look for. If the user has
# given us a full application directory name (for example, Gorm.app)
# then we only search for the given directory name; if instead the
# user has given us the application name without the suffix (for
# example, 'Gorm') we want to search for Gorm.app, then for
# Gorm.debug, then for Gorm.profile (in that order).
# If the appname is known, save it to avoid running a grep later to get it.
# Check if the user has provided the .app suffix; if not, add it.
# Save the appname (without the .app suffix) if we have it, so
# we save a sed (to remove the .app suffix) later on.
case "$app" in
*.app) a1="$app"; a2=""; a3=""; appname="";;
*.debug) a1="$app"; a2=""; a3=""; appname="";;
*.profile) a1="$app"; a2=""; a3=""; appname="";;
*) a1="$app.app"; a2="$app.debug" a3="$app.profile"; appname="$app";
*.app) appname="";;
*) appname="$app"; app="$app.app";;
esac
case "$app" in
/*) # An absolute path.
for appdir in "$a1" "$a2" "$a3"; do
if [ \( "" != "$appdir" \) -a \( -d "$appdir" \) ]; then
full_appname="$appdir"
break
fi
done
if [ -d "$app" ]; then
full_appname="$app"
fi
;;
*/*) # A relative path
for appdir in "$a1" "$a2" "$a3"; do
if [ \( "" != "$appdir" \) -a \( -d "$appdir" \) ]; then
full_appname="`(cd \"$appdir\"; pwd)`"
break
fi
done
if [ -d "$app" ]; then
full_appname="`(cd \"$app\"; pwd)`"
fi
;;
*)
# We should first search the standard GNUstep locations.
for dir in "$GNUSTEP_USER_ROOT" "$GNUSTEP_LOCAL_ROOT" "$GNUSTEP_NETWORK_ROOT" "$GNUSTEP_SYSTEM_ROOT"; do
for appdir in "$a1" "$a2" "$a3"; do
# Standard locations ... in $dir/Applications/$appdir
if [ \( "" != "$appdir" \) -a \( -d "$dir/Applications/$appdir" \) ]; then
full_appname="`(cd \"$dir/Applications/$appdir\"; pwd)`"
break 2
# Standard locations ... in $dir/Applications/$app
if [ -d "$dir/Applications/$app" ]; then
full_appname="`(cd \"$dir/Applications/$app\"; pwd)`"
break
fi
done
done
if [ -z "$full_appname" ]; then
# And now search the standard PATH (may include '.')
old_IFS="$IFS"
IFS=:
for dir in $PATH; do
for appdir in "$a1" "$a2" "$a3"; do
if [ \( "" != "$appdir" \) -a \( -d "$dir/$appdir" \) ]; then
full_appname="`(cd \"$dir/$appdir\"; pwd)`"
break 2
if [ -d "$dir/$app" ]; then
full_appname="`(cd \"$dir/$app\"; pwd)`"
break
fi
done
done
IFS="$old_IFS"
fi
;;
esac
unset app_list
unset appdir
if [ -z "$full_appname" ]; then
echo "Can't find the required application: $app!"
if [ -d "./$app" ]; then
echo "There is a $app in this directory; please use 'openapp ./$app' if you want to open it!"
fi
exit 1
fi
@ -145,7 +130,7 @@ fi
# get base app name
if [ -z "$appname" ]; then
appname="`echo \"$app\" | sed 's/\.[a-z]*$//'`"
appname="`echo \"$app\" | sed 's/\.app$//'`"
fi
appname="`basename \"$appname\"`"