$NetBSD: patch-ab,v 1.4 2008/11/17 19:58:59 he Exp $ --- Makefile.orig 2003-02-03 14:36:55.000000000 +0000 +++ Makefile @@ -1,33 +1,30 @@ DIRS = c_stuff -PREFIX = /usr/local DATADIR = $(PREFIX)/share BINDIR = $(PREFIX)/bin -MANDIR = $(DATADIR)/man +MANDIR = $(PREFIX)/man all: dirs dirs: - @if ! perl -e 'use SDL'; then echo -e "\n *** I need perl-SDL installed"; false; fi - @if ! perl -e 'use SDL; ($$mj, $$mn, $$mc) = split /\./, $$SDL::VERSION; exit 1 if $$mj<1 || $$mn<19'; then echo -e "\n *** I need perl-SDL version 1.19.0 or upper"; false; fi + @if ! ${PERL5} -e 'use SDL'; then echo -e "\n *** I need perl-SDL installed"; false; fi + @if ! ${PERL5} -e 'use SDL; ($$mj, $$mn, $$mc) = split /\./, $$SDL::VERSION; exit 1 if $$mj<1 || ($$mj == 1 && $$mn<19)'; then echo -e "\n *** I need perl-SDL version 1.19.0 or higher"; false; fi @for n in . $(DIRS); do \ [ "$$n" = "." ] || $(MAKE) -C $$n ;\ done @if [ ! -d save_virgin ]; then mkdir save_virgin; cp c_stuff/lib/fb_stuff.pm save_virgin; fi - cp -f save_virgin/fb_stuff.pm c_stuff/lib/fb_stuff.pm - perl -pi -e 's|\@DATADIR\@|$(DATADIR)|' c_stuff/lib/fb_stuff.pm + ${CP} -f save_virgin/fb_stuff.pm c_stuff/lib/fb_stuff.pm + ${PERL5} -pi -e 's|\@DATADIR\@|$(DATADIR)|' c_stuff/lib/fb_stuff.pm install: $(ALL) @for n in $(DIRS); do \ (cd $$n; $(MAKE) install) \ done - install -d $(BINDIR) - install frozen-bubble frozen-bubble-editor $(BINDIR) - install -d $(DATADIR)/frozen-bubble - cp -a gfx snd data $(DATADIR)/frozen-bubble - install -d $(MANDIR)/man6 - install doc/*.6 $(MANDIR)/man6 + ${BSD_INSTALL_SCRIPT} frozen-bubble frozen-bubble-editor $(BINDIR) + ${BSD_INSTALL_DATA_DIR} $(DATADIR)/frozen-bubble + ${CP} -R gfx snd data $(DATADIR)/frozen-bubble + ${BSD_INSTALL_MAN} doc/*.6 $(MANDIR)/man6 clean: @for n in $(DIRS); do \