aboutsummaryrefslogtreecommitdiff
path: root/Makefile.PL
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-11-20 22:12:43 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-11-20 22:12:43 +0000
commit5bc73d7facbea81ae533777affaffbe3d7476c0f (patch)
tree34c96a7f781930535890a52cb0d80ddeed395caf /Makefile.PL
parenta95a7a428f439a08702f65da3b887382479ccaf0 (diff)
downloadikiwiki-5bc73d7facbea81ae533777affaffbe3d7476c0f.tar
ikiwiki-5bc73d7facbea81ae533777affaffbe3d7476c0f.tar.gz
* Rename ikiwiki.pl so MakeMaker doesn't see it, and install it.
* Add some code to the build system that tries to determine if the lib installation directory is in @INC. If it's not, munge ikiwiki to hardcode the path to the lib directory. This should allow installing ikiwiki in nonstandard locations, including home directories, by just setting PREFIX at build time. * Fix nested examples directory in deb.
Diffstat (limited to 'Makefile.PL')
-rwxr-xr-xMakefile.PL16
1 files changed, 13 insertions, 3 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 831c13255..6e75097c8 100755
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -13,8 +13,18 @@ pure_install:: extra_install
VER=$(shell perl -e '$$_=<>;print m/\((.*?)\)/'<debian/changelog)
+PROBABLE_INST_LIB=$(shell \\
+ if [ "$(INSTALLDIRS)" = "perl" ]; then \\
+ echo $(INSTALLPRIVLIB); \\
+ elif [ "$(INSTALLDIRS)" = "site" ]; then \\
+ echo $(INSTALLSITELIB); \\
+ elif [ "$(INSTALLDIRS)" = "vendor" ]; then \\
+ echo $(INSTALLVENDORLIB); \\
+ fi \\
+)
+
extra_build:
- ./ikiwiki.pl doc html --templatedir=templates --underlaydir=basewiki \
+ ./ikiwiki.in doc html --templatedir=templates --underlaydir=basewiki \
--wikiname="ikiwiki" --verbose --no-rcs \
--exclude=/discussion --no-discussion \
--plugin=brokenlinks --plugin=pagecount \
@@ -24,7 +34,7 @@ extra_build:
--plugin=template --plugin=toc --plugin=shortcut
./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man
./mdwn2man ikiwiki-mass-rebuild 8 doc/ikiwiki-mass-rebuild.mdwn > ikiwiki-mass-rebuild.man
- ./pm_filter $(PREFIX) $(VER) < ikiwiki.pl > ikiwiki.out
+ ./pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB) < ikiwiki.in > ikiwiki.out
extra_clean:
rm -rf html doc/.ikiwiki
@@ -57,6 +67,6 @@ extra_install:
WriteMakefile(
NAME => 'IkiWiki',
PREFIX => "/usr/local",
- PM_FILTER => './pm_filter $(PREFIX) $(VER)',
+ PM_FILTER => './pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB)',
MAN1PODS => {},
);