1# 2# Makefile for job exit code management scripts 3 4AUTOMAKE_OPTIONS = foreign 5 6bin_SCRIPTS = sjobexitmod 7 8sjobexitmod: 9 10_perldir=$(exec_prefix)`perl -e 'use Config; $$T=$$Config{installsitearch}; $$P=$$Config{installprefix}; $$P1="$$P/local"; $$T =~ s/$$P1//; $$T =~ s/$$P//; print $$T;'` 11 12install-binSCRIPTS: $(bin_SCRIPTS) 13 @$(NORMAL_INSTALL) 14 test -z "$(DESTDIR)$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" 15 @list='$(bin_SCRIPTS)'; for p in $$list; do \ 16 echo "sed 's%use lib .*%use lib qw(${_perldir});%' $(top_srcdir)/contribs/sjobexit/$$p.pl > $(DESTDIR)$(bindir)/$$p"; \ 17 sed "s%use lib .*%use lib qw(${_perldir});%" $(top_srcdir)/contribs/sjobexit/$$p.pl >$(DESTDIR)$(bindir)/$$p; \ 18 chmod 755 $(DESTDIR)$(bindir)/$$p;\ 19 done 20 21uninstall-binSCRIPTS: 22 @$(NORMAL_UNINSTALL) 23 @list='$(bin_SCRIPTS)'; for p in $$list; do \ 24 echo " rm -f '$(DESTDIR)$(bindir)/$$p'"; \ 25 rm -f "$(DESTDIR)$(bindir)/$$p"; \ 26 done 27 28clean: 29