X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/67e778f461ed0f5da0a109573b57d9f1022bcf9e..2e15a490067991448c3b65323ad9ecdc774dbfe4:/Makefile.PL diff --git a/Makefile.PL b/Makefile.PL index 61fe336b8..bee9dfa11 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -24,10 +24,10 @@ MANDIR?=$(PREFIX)/share/man tflag=$(shell if [ -n "$$NOTAINT" ] && [ "$$NOTAINT" != 1 ]; then printf -- "-T"; fi) extramodules=$(shell if [ "$$PROFILE" = 1 ]; then printf -- "-d:NYTProf"; fi) -outprogs=ikiwiki.out ikiwiki-transition.out ikiwiki-calendar.out +outprogs=ikiwiki.out ikiwiki-transition.out ikiwiki-calendar.out ikiwiki-comment.out scripts=ikiwiki-update-wikilist ikiwiki-makerepo sysconfdir_scripts=ikiwiki-mass-rebuild ikiwiki-update-wikilist -shebang_scripts=$(shell $(FIND) . -type f \( -name '*.in' -o -name '*.cgi' -o -name '*.pm' -o -name '*.pm.example' -o -name '*.t' -o -name '*.setup' -o -name 'ikiwiki-mass-rebuild' -o -name 'ikiwiki-update-wikilist' -o -name 'gitremotes' -o -name 'mdwn2man' -o -name 'pm_filter' -o -name 'po2wiki' -o -name 'externaldemo' \)) +shebang_scripts=$(shell $(FIND) . -type f \( -name '*.in' -o -name '*.cgi' -o -name '*.pm' -o -name '*.pm.example' -o -name '*.t' -o -name '*.setup' -o -name 'ikiwiki-comment' -o -name 'ikiwiki-mass-rebuild' -o -name 'ikiwiki-update-wikilist' -o -name 'gitremotes' -o -name 'mdwn2man' -o -name 'pm_filter' -o -name 'po2wiki' -o -name 'externaldemo' \)) PROBABLE_INST_LIB=$(shell \\ if [ "$(INSTALLDIRS)" = "perl" ]; then \\ @@ -44,7 +44,7 @@ PROBABLE_INST_LIB=$(shell \\ chmod +x $@ ikiwiki.setup: - HOME=/home/me $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in -dumpsetup ikiwiki.setup + HOME=/home/me $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in --dumpsetup ikiwiki.setup extra_build: perl_shebangs $(outprogs) ikiwiki.setup docwiki sysconfdir ./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man @@ -53,17 +53,18 @@ extra_build: perl_shebangs $(outprogs) ikiwiki.setup docwiki sysconfdir ./mdwn2man ikiwiki-transition 1 doc/ikiwiki-transition.mdwn > ikiwiki-transition.man ./mdwn2man ikiwiki-update-wikilist 1 doc/ikiwiki-update-wikilist.mdwn > ikiwiki-update-wikilist.man ./mdwn2man ikiwiki-calendar 1 doc/ikiwiki-calendar.mdwn > ikiwiki-calendar.man + ./mdwn2man ikiwiki-comment 1 doc/ikiwiki-comment.mdwn > ikiwiki-comment.man $(MAKE) -C po $(PERL) -pi.bkp -e "s/Version:.*/Version: $(VER)/" ikiwiki.spec rm -f ikiwiki.spec.bkp docwiki: - $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in -setup docwiki.setup -refresh + $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in --setup docwiki.setup --refresh perl_shebangs: ifneq "$(PERL)" "/usr/bin/perl" for file in $(shebang_scripts); do \ - $(SED) -e "1s|^#!/usr/bin/perl|#!$(PERL)|" < $$file > "$$file.new"; \ + $(PERL) -pe "s|^#!/usr/bin/perl\b|#!$(PERL)| if 1" < $$file > "$$file.new"; \ [ -x $$file ] && chmod +x "$$file.new"; \ mv -f "$$file.new" $$file; \ done @@ -72,7 +73,7 @@ endif perl_shebangs_clean: ifneq "$(PERL)" "/usr/bin/perl" for file in $(shebang_scripts); do \ - $(SED) -e "1s|^#!$(PERL)|#!/usr/bin/perl|" < $$file > "$$file.new"; \ + $(PERL) -pe "s|^#!$(PERL)\b|#!/usr/bin/perl| if 1" < $$file > "$$file.new"; \ [ -x $$file ] && chmod +x "$$file.new"; \ mv -f "$$file.new" $$file; \ done @@ -82,7 +83,7 @@ sysconfdir: $(PERL) -pi -e "s|\"/etc/ikiwiki|\"$(SYSCONFDIR)|g" $(sysconfdir_scripts) extra_clean: perl_shebangs_clean - $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in -setup docwiki.setup -clean + $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in --setup docwiki.setup --clean rm -f *.man $(outprogs) ikiwiki.setup plugins/*.pyc $(MAKE) -C po clean @@ -156,6 +157,7 @@ extra_install: underlay_install install -m 644 ikiwiki-transition.man $(DESTDIR)$(MANDIR)/man1/ikiwiki-transition.1 install -m 644 ikiwiki-update-wikilist.man $(DESTDIR)$(MANDIR)/man1/ikiwiki-update-wikilist.1 install -m 644 ikiwiki-calendar.man $(DESTDIR)$(MANDIR)/man1/ikiwiki-calendar.1 + install -m 644 ikiwiki-comment.man $(DESTDIR)$(MANDIR)/man1/ikiwiki-comment.1 install -d $(DESTDIR)$(MANDIR)/man8 install -m 644 ikiwiki-mass-rebuild.man $(DESTDIR)$(MANDIR)/man8/ikiwiki-mass-rebuild.8