Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
d4a7ecf4
Commit
d4a7ecf4
authored
Aug 31, 2007
by
Ian Lynagh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Obey DESTDIR when installing library docs
parent
9b8b293b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
libraries/Makefile
libraries/Makefile
+9
-7
libraries/installPackage.hs
libraries/installPackage.hs
+5
-5
No files found.
libraries/Makefile
View file @
d4a7ecf4
...
...
@@ -298,15 +298,17 @@ endif
.PHONY
:
install install-docs install.library.%
DESTlibraryhtmldir
=
$(DESTDIR)$(libraryhtmldir)
/html
install
:
$(foreach SUBDIR
,
$(SUBDIRS)
,
install.library.$(SUBDIR))
ifeq
"$(HADDOCK_DOCS)" "YES"
$(INSTALL_DIR)
$(libraryhtmldir)
/html
$(INSTALL_DATA)
index.html doc-index.html
$(libraryhtmldir)
/html
$(INSTALL_SCRIPT)
gen_contents_index
$(libraryhtmldir)
/html
$(INSTALL_DIR)
$(
DEST
libraryhtmldir)
$(INSTALL_DATA)
index.html doc-index.html
$(
DEST
libraryhtmldir)
$(INSTALL_SCRIPT)
gen_contents_index
$(
DEST
libraryhtmldir)
# Hacks:
$(INSTALL_DATA)
$(libraryhtmldir)
/
html/
base/
*
.css
$(libraryhtmldir)
/html
$(INSTALL_DATA)
$(libraryhtmldir)
/
html/
base/
*
.js
$(libraryhtmldir)
/html
$(INSTALL_DATA)
$(libraryhtmldir)
/
html/
base/
*
.gif
$(libraryhtmldir)
/html
$(INSTALL_DATA)
$(
DEST
libraryhtmldir)
/base/
*
.css
$(
DEST
libraryhtmldir)
$(INSTALL_DATA)
$(
DEST
libraryhtmldir)
/base/
*
.js
$(
DEST
libraryhtmldir)
$(INSTALL_DATA)
$(
DEST
libraryhtmldir)
/base/
*
.gif
$(
DEST
libraryhtmldir)
endif
# Cabal doesn't let us ask to install docs only, so do nothing here
...
...
@@ -320,7 +322,7 @@ $(foreach SUBDIR,$(SUBDIRS),install.library.$(SUBDIR)): \
install.library.%: installPackage/installPackage ifBuildable/ifBuildable
if
ifBuildable/ifBuildable
$*
;
then
\
cd
$*
&&
\
../installPackage/installPackage
$(DESTDIR)$(prefix)
$(FPTOOLS_TOP_ABS)
/
$(GHC_PKG_DIR_REL)
/ghc-pkg-inplace
$(DESTDIR)$(libdir)
/package.conf
;
\
../installPackage/installPackage
$(DESTDIR)
$(prefix)
$(FPTOOLS_TOP_ABS)
/
$(GHC_PKG_DIR_REL)
/ghc-pkg-inplace
$(DESTDIR)$(libdir)
/package.conf
;
\
fi
.PHONY
:
binary-dist binary-dist.library.%
...
...
libraries/installPackage.hs
View file @
d4a7ecf4
...
...
@@ -11,7 +11,7 @@ import System.Environment
main
::
IO
()
main
=
do
args
<-
getArgs
case
args
of
pref
:
ghcpkg
:
ghcpkgconf
:
args'
->
destdir
:
pref
:
ghcpkg
:
ghcpkgconf
:
args'
->
let
verbosity
=
case
args'
of
[]
->
normal
[
'-'
:
'v'
:
v
]
->
...
...
@@ -20,14 +20,14 @@ main = do args <- getArgs
_
->
Just
v
in
flagToVerbosity
m
_
->
error
(
"Bad arguments: "
++
show
args
)
in
doit
pref
ghcpkg
ghcpkgconf
verbosity
in
doit
destdir
pref
ghcpkg
ghcpkgconf
verbosity
_
->
error
"Missing arguments"
doit
::
FilePath
->
FilePath
->
FilePath
->
Verbosity
->
IO
()
doit
pref
ghcpkg
ghcpkgconf
verbosity
=
doit
::
FilePath
->
FilePath
->
FilePath
->
FilePath
->
Verbosity
->
IO
()
doit
destdir
pref
ghcpkg
ghcpkgconf
verbosity
=
do
let
userHooks
=
simpleUserHooks
copyFlags
=
(
emptyCopyFlags
No
Copy
Dest
)
{
copyFlags
=
(
emptyCopyFlags
(
Copy
To
destdir
)
)
{
copyVerbose
=
verbosity
}
registerFlags
=
emptyRegisterFlags
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment