job000018 #7

  • //
  • spec/
  • job/
  • job000018
  • View
  • Commits
  • Open Download .zip Download (3 KB)
# Perforce Public Depot Jobs
#
#  Job:           The job name. 'new' generates a sequenced job number.
#  Status:        Job status; [open/closed/suspended].  Required
#  Project:       The project this job is for [none/cdsp4/jam/p4hl]  Optional.
#  Severity:      [A/B/C] (A is highest)  Required.
#  ReportedBy     The user who created the job. Can be changed.
#  ReportedDate:  The date the job was created.  Automatic.
#  ModifiedBy:    The user who last modified this job. Automatic.
#  ModifiedDate:  The date this job was last modified. Automatic.
#  OwnedBy:       The owner, responsible for doing the job. Optional.
#  Description:   Description of the job.  Required.
#  DevNotes:      Developer's comments.  Optional.

Job:	job000018

Status:	closed

Project:	jam

Severity:	C

ReportedBy:	[email protected]

ReportedDate:	2002/03/20 08:36:23

ModifiedBy:	shawn_hladky

ModifiedDate:	2008/04/13 13:00:54

Description:
	InstallInto dependency and chmod problems
	
	(rmg 3/20/2002:)
	| From: "EXT-Goodson, Stephen" <[email protected]>
	| To: "'[email protected]'" <[email protected]>
	| Subject: Jam bug in InstallInto
	| Date: Tue, 19 Mar 2002 21:04:41 -0800
	| MIME-Version: 1.0
	| X-Mailer: Internet Mail Service (5.5.2650.21)
	| Content-Type: text/plain;
	| 	charset="ISO-8859-1"
	| 
	| Hi,
	| 
	| I'm not a perforce user (yet), so I hope it's ok if I send you a bug fix
	| directly rather than into the public depot.
	| 
	| There are two problems with the InstallInto rule when it is invoked
	| with multiple targets.
	|   - The DEPENDS rule makes all installed targets depend on all sources. Each
	|     installed target should depend only on the corresponding source target.
	|   - Because Chmod is invoked on all targets at once, the single Chmod action
	|     can occur before all of the individual Install actions have occurred,
	|     which causes it to fail.
	| The fix is to move both inside the for loop.
	|     
	| Another change I've made is to use $(INSTALL_GRIST) instead of the
	| hard-coded "install".  It was necessary for our project, and seems to
	| be in the spirit of jam, so I hope you'll consider that change too.  I
	| don't think it should affect any existing Jamfiles, unless someone happened
	| to use the INSTALL_GRIST variable for something else.  This change
	| would need to be made elsewhere in Jambase too.
	| 
	| Steve
	| 
	| 
	| +INSTALL_GRIST = installed ;
	| +
	|  rule InstallInto
	|  {
	|     local i t ;
	|  
	| -   t = $(>:G=installed) ;
	| +   t = $(>:G=$(INSTALL_GRIST)) ;
	|  
	|     DEPENDS install : $(t) ;
	| -   DEPENDS $(t) : $(>) ;
	|     SEARCH on $(>) = $(SEARCH_SOURCE) ;
	|     MakeLocate $(t) : $(<) ;
	| 
	|     # Arrange for jam uninstall
	|  
	|     Clean uninstall : $(t) ;
	| 
	|     for i in $(>)
	|     {
	| -       Install $(i:G=installed) : $(i) ;
	| +       DEPENDS $(i:G=$(INSTALL_GRIST)) : $(i) ;
	| +       Install $(i:G=$(INSTALL_GRIST)) : $(i) ;
	| +       Chmod   $(i:G=$(INSTALL_GRIST)) ;
	|     }
	| 
	| -   Chmod $(t) ;
	| -
	|     if $(UNIX)
	|     {
	|         if $(OWNER) { Chown $(t) ; OWNER on $(t) = $(OWNER) ; }
	|         if $(GROUP) { Chgrp $(t) ; GROUP on $(t) = $(GROUP) ; }
	|     }
	|  }
	| 	
	| 
# Change User Description Committed
#7 default
#6 default
#5 default
#4 default
#3 default
#2 default
#1 default