From 5935f6a0e6be04129ad29fd7ce2f72267499ccd3 Mon Sep 17 00:00:00 2001 From: hjp Date: Tue, 5 Jul 2016 20:26:11 +0000 Subject: [PATCH] Add GNUmakerules, GNUmakevars; Remove very obsolete target install_all --- prwtmp/GNUmakefile | 19 +++++++++---------- prwtmp/GNUmakerules.pl | 8 ++++++++ prwtmp/GNUmakevars.sh | 5 +++++ 3 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 prwtmp/GNUmakerules.pl create mode 100755 prwtmp/GNUmakevars.sh diff --git a/prwtmp/GNUmakefile b/prwtmp/GNUmakefile index 259f83f..13aa5ba 100644 --- a/prwtmp/GNUmakefile +++ b/prwtmp/GNUmakefile @@ -5,12 +5,11 @@ prwtmp: install: $(ROOT)/usr/local/bin/prwtmp $(ROOT)/usr/local/man/man8/prwtmp.8 -install_all: - $(MAKE) install ROOT=/nfs/wsrdb - $(MAKE) install ROOT=/nfs/wsrcom - $(MAKE) install ROOT=/nfs/wifosv - $(MAKE) install ROOT=/nfs/ihssv - $(MAKE) install ROOT=/nfs/wsrtest +clean: + rm prwtmp + +distclean: clean + rm GNUmakerules GNUmakevars $(ROOT)/usr/local/bin/%: % $(INSTALL) $< $@ @@ -18,8 +17,8 @@ $(ROOT)/usr/local/bin/%: % $(ROOT)/usr/local/man/man8/%.8: %.man $(INSTALL) $< $@ -clean: - rm prwtmp +GNUmakevars: GNUmakevars.sh + sh ./$^ > $@ +GNUmakerules: GNUmakerules.pl + perl ./$^ > $@ -distclean: clean - rm GNUmakerules GNUmakevars diff --git a/prwtmp/GNUmakerules.pl b/prwtmp/GNUmakerules.pl new file mode 100644 index 0000000..8f30daa --- /dev/null +++ b/prwtmp/GNUmakerules.pl @@ -0,0 +1,8 @@ +#!/usr/bin/perl +use warnings; +use strict; + +print "\$(BINDIR)/%: %\n"; +print "\tcp \$^ \$@\n"; +print "\$(MAN1DIR)/%: %\n"; +print "\tcp \$^ \$@\n"; diff --git a/prwtmp/GNUmakevars.sh b/prwtmp/GNUmakevars.sh new file mode 100755 index 0000000..a7de4ae --- /dev/null +++ b/prwtmp/GNUmakevars.sh @@ -0,0 +1,5 @@ +#!/bin/sh +prefix=${prefix:-/usr/local} +echo "BINDIR=$prefix/bin" +echo +echo "all:"