#!smake
#
#  Makefile.personal
#  IRIX 6.5 version
#
#  Makefile for creating personal desktop icons
#
#  ----------------------------------------------------------------------------
#
#
#  WHAT THIS FILE IS FOR
#  ---------------------
#
#  The Indigo Magic Desktop uses icons on the screen background and in 
#  iconviews (dirviews) to represent files, printers, hosts, devices, people, 
#  and URLs.  During a login session, you manipulate the icons to affect the 
#  underlying files and entities.  For example, double-clicking an application 
#  icon will launch the underlying application. 
#
#  Using this Makefile, you can create new desktop icons or change icons'
#  behaviors for your own personal use.  The new icons will appear only in
#  the desktop environment that appears when someone logs into your login
#  account.  (Note that you can share a directory so people can view its 
#  contents on their systems, but people will see the system's default icons.  
#  For instance, they may see a plain text icon instead of your icon.)
#
#  Note: Indigo Magic Desktop icons are the cartoon-style line-drawn pictures 
#  that you can double-click.  They are not the rectangular photograph-like 
#  85x68-pixel RGB images that appear when you minimize a window.
#
#
#  WHOM THIS FILE IS FOR
#  ---------------------
#
#  This file is intended for the use of SGI end users: people who might also 
#  use Alias, Showcase, WebMagic, or other end-user applications daily.
#  No root or superuser permission is required to create personal desktop 
#  icons.  You may need, however, some drawing skill, design sense, and 
#  patience (or a graphic designer with these qualities) to use IconSmith to 
#  design new icon pictures.  You may also need some basic Bourne shell and 
#  C programming experience (or patience and pattern-matching skills) to 
#  program your icons to behave the way you want.
#
#  This file is not designed for SGI partners or professional application 
#  developers.  Their filetypes should instead be installed alongside the 
#  system filetypes in /usr/lib/filetype/install on the SGI system.  For full 
#  instructions, please refer to this online book:
#     * Indigo Magic Desktop Integration Guide
#
#
#  WHY TO USE THIS FILE
#  --------------------
#
#  Situations in which you might want to use this file:
#
#  A. To replace the icon picture for a particular icon with your own design.
#
#  B. To create a unique icon for one of your own applications and for the 
#     data files it creates, so when you view the application and datafile 
#     icons in a dirview or on the desktop background they appear with unique 
#     pictures and when you double-click the icons your application launches.
#
#  C. To add some menu items to the right-mouse-button menu (or toolchest 
#     Selected menu) for some type of icon.
#
#  Refer to these scenarios when deciding which steps to follow in the next 
#  section.
#
#
#  HOW TO USE THIS FILE
#  --------------------
#
#  For each different kind of icon there exists a unique filetype, which 
#  defines the icon's picture and behaviors.  Thus, to change an icon picture 
#  or behaviors, you create or change a filetype in a .ftr file.  All icons of 
#  that type will look and behave identically, though the individual underlying
#  entities will vary.  For example, icons of TYPE AsciiTextFile look alike 
#  (three sheets of paper with writing on the front sheet) and behave alike 
#  (when you double-click them, the contents are loaded into your favorite 
#  text editor), but the underlying files contain different text.
#
#  To create your own desktop icons or program new icon behaviors, perform the 
#  following 10 steps in a Unix shell window (from the Toolchest, choose 
#  Desktop > Open Unix Shell).  Some steps are optional and depend on which 
#  scenario you want.  (You can select and paste the % commands.)
#
#  0. If you haven't already, go to the system filetypes directory.
#
#      % cd /usr/lib/filetype
#
#  1. Create the special directory where the Indigo Magic Desktop 
#     will look for your personal icons.  It must be named this way.
#
#      % mkdir ~/.desktop-`hostname`/filetype/
#
#  2. Copy this Makefile to your new icons directory, and rename it 
#     as "Makefile" without the ".personal" suffix.  It must be named 
#     this way, and its contents should remain unchanged.
#
#      % cp ./Makefile.personal ~/.desktop-`hostname`/filetype/Makefile
#
#  3. Copy the example .ftr file to your personal filetype directory.  
#     The command shown will copy the file as "mine.ftr", but you 
#     can rename this file as you wish, as long as it ends with the 
#     ".ftr" suffix.
#
#      % cp ./sampleFtrs/sample.ftr ~/.desktop-`hostname`/filetype/mine.ftr
#
#  4. Go to the new directory.
#
#      % cd ~/.desktop-`hostname`/filetype/
#
#     Then use your favorite editor (for example, Jot, NEdit, vi, or 
#     emacs) to define one or more new filetypes in the file whose name 
#     ends with the ".ftr" suffix.  See the mine.ftr file's comments
#     for instruction on editing it to replace an icon picture or to
#     add menu commands to the right-mouse-button menu of an icon.
#
#     For help with programming new menu commands or new mouse-click 
#     responses for your icon, please see these online books:
#       * Indigo Magic Desktop Integration Guide, Ch.13
#       * Indigo Magic User Interface Guidelines, Ch.2.2
#     and the fftr(1) reference page.       
#
#     You can put up to 200 different .ftr files in your personal icons
#     directory.  You can put as many different TYPEs as you like into 
#     a single .ftr file.
#
#  NOTE: Follow Steps 5-7 only if you want a new icon picture (ex., Scenario A 
#  or Scenario B):
#
#  5. Create the directory where your icon pictures will go.
#
#      % mkdir ~/.desktop-`hostname`/filetype/iconlib/
#
#  6. Move to the new directory.
#
#      % cd ~/.desktop-`hostname`/filetype/iconlib/
#
#  7. Use the IconSmith program to create one or more unique icon 
#     picture files (".fti" files) for your filetype.  For help and 
#     advice on icon picture design, please consult these online books:
#        * Indigo Magic Desktop Integration Guide, Ch.12
#        * Indigo Magic User Interface Guidelines, Ch.2.1
#     IconSmith may be installed from the "desktop_tools" product on 
#     your IRIX CD-ROM.  Icon picture files must end in ".fti".
#
#      % iconsmith YourIcon.fti
#
#     When finished creating your icon, go back to your personal
#     icons database directory:
#
#      % cd ..
#
#  8. This step compiles your filetypes and icon pictures into an icon 
#     database called "desktop.otr".  It differs from the system
#     /usr/lib/filetype/desktop.otr file in that your desktop.otr 
#     contains *only* your personal icon definitions, whereas the 
#     system desktop.otr contains all system icon definitions and is 
#     used by everyone who logs into the system. 
#
#      % make
#
#  9. IMPORTANT: Fix any errors that are reported during the "make" 
#     process, and double-check to ensure the behavior is what you 
#     want.  Common errors include
#        * Omitting a semicolon at the end of a MATCH rule
#        * Using "=" instead of "==" in a tag MATCH rule
#        * A missing ICON rule or icon picture file
#        * Typos in the included icon picture's path
#
#     This step is particularly important when you override any 
#     system icon types (ex., Scenario A or Scenario C).  If you 
#     copy a filetype from under the /usr/lib/filetype directory and 
#     redefine the icon picture or some of the behaviors, then the 
#     Indigo Magic Desktop will use your version instead of the 
#     system-defined version, so use caution when you copy a filetype
#     but don't change the TYPE.  For example, you can override the 
#     system definition for TYPE WebJumpsite with your own icon 
#     picture and behaviors, but if there are any mistakes in your 
#     personal version of this filetype, then all your webjumper 
#     icons will be affected and may possibly appear as generic text 
#     files.  If this happens, you can immediately restore the normal 
#     system behavior by moving aside your .ftr file that contains 
#     the overridden filetype:
#          mv mine.ftr mine.ftr.skip        
#     and rebuild your personal icons database:
#          make clobber; make
#
#     To avoid such problems, it can be safer to derive a new type 
#     from a system type, by copying the filetype and then changing 
#     the type name.  For example, if you want some special behavior 
#     for your webjumpers, you can copy and paste the WebJumpsite 
#     filetype from the /usr/lib/filetype/system/webjumper.ftr file, 
#     change the type name to "MyWebJumpsite", then add your custom
#     behaviors.
#
# 10. Log out and log back in.  For Scenarios A, B, and C (as 
#     described under "Why to Use This File"), these should be the 
#     results:
#
#    A. Your custom icon picture should replace the old one.
#
#    B. Your application should have its own icon.
#
#    C. New menu commands should be available at the bottom of the 
#       right-mouse menu (or toolchest Selected menu) for all icons 
#       of the type you created or changed.
#
#
#  ---------
#  This customization was available with WorkSpace in IRIX 4.X but it has not 
#  been available with the Indigo Magic Desktop in IRIX 5.X or 6.X until 
#  IRIX 6.5.
#  ----------------------------------------------------------------------------


# Ignore any other translations in inference rules.
# If curious, see the make(1) reference page to learn more.
.SUFFIXES:
.NULL:

SHELL=/bin/sh

FTR_FILES=*.ftr

# The target database name must always be "desktop.otr" so
# the Indigo Magic Desktop will recognize your icons.
default all: desktop.otr

desktop.otr: ${FTR_FILES}
	@rm -f $@
	/usr/sbin/fftr ${FTR_FILES} -o $@

clobber:
	@rm -f *.otr
