MAN1=grog.n
CLEANADD=grog

all: grog

grog: grog.pl grog.sh
	if test -n "$(PERLPATH)" && test -f "$(PERLPATH)"; then \
	  rm -f $@; \
	  sed -e "s|/usr/bin/perl|$(PERLPATH)|" \
	      -e "s|@VERSION@|$(version)$(revision)|" $(srcdir)/grog.pl >$@; \
	else \
	  rm -f $@; \
	  sed -e "s|@g@|$(g)|g" \
	      -e "s|@VERSION@|$(version)$(revision)|" \
	      -e $(SH_SCRIPT_SED_CMD) $(srcdir)/grog.sh >$@; \
	fi
	chmod +x $@

install_data: grog
	-test -d $(bindir) || $(mkinstalldirs) $(bindir)
	-rm -f $(bindir)/grog
	$(INSTALL_SCRIPT) grog $(bindir)/grog

uninstall_sub:
	-rm -f $(bindir)/grog
