#764: DESTDIR Makefile variable
------------------------------+---------------------------------------------
  Reporter:  guest            |          Owner:         
      Type:  feature request  |         Status:  closed 
  Priority:  normal           |      Milestone:         
 Component:  Build System     |        Version:  6.4.2  
  Severity:  normal           |     Resolution:  invalid
  Keywords:                   |             Os:  Unknown
Difficulty:  Unknown          |   Architecture:  Unknown
------------------------------+---------------------------------------------
Comment (by guest):

 I wouldn't say that the way the RPM .spec file handles this is entirely
 straightforward.  There is a large comment about how to selectively remove
 the RPM_BUILD_ROOT prefix, which ends with the plea: "isn't there an
 easier way to do all this?"  The answer is yes, there is.  DESTDIR is the
 mechanism.

 Everywhere the 'make install' target actually copies something to its
 final destination, just use the target path $(DESTDIR)$(prefix)/blah
 instead of $(prefix)/blah.  Most of the time DESTDIR is empty, so this is
 equivalent to the ordinary current case.  Only when you need to package
 everything into a sandbox, the caller sets DESTDIR to the root of the
 sandbox.  The Makefile for rts/gmp already does the DESTDIR thing right.
 It could be done elsewhere too.  For instance, all the binary distribution
 packaging rules could use DESTDIR rather than all the $(BIN_DIST_TMPDIR)
 stuff.

 (Oh, and remove the dead but conflicting definition of DESTDIR in
 compiler/Makefile)

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/764>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to