From 040a8e2e2b6f6671d2b0722cb89aa37631ebd059 Mon Sep 17 00:00:00 2001 From: brian Date: Fri, 30 Jun 2006 16:11:30 +0000 Subject: [PATCH] Reduce duplication in and simplify. --- lustre/scripts/Makefile.am | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/lustre/scripts/Makefile.am b/lustre/scripts/Makefile.am index 0bfb9de..8a3b3cd 100644 --- a/lustre/scripts/Makefile.am +++ b/lustre/scripts/Makefile.am @@ -2,35 +2,21 @@ # # This code is issued under the GNU General Public License. # See the file COPYING in this distribution -sbin_SCRIPTS = lustre_config.sh lc_modprobe.sh lc_net.sh lc_hb.sh lc_mon.sh lc_cluman.sh lc_servip.sh lustre_createcsv.sh lustre_up14.sh + +# These are scripts that are generated from .in files +genscripts = lustre_config.sh lc_modprobe.sh lc_net.sh lc_hb.sh lc_cluman.sh lustre_createcsv.sh + +sbin_SCRIPTS = $(genscripts) lc_servip.sh lustre_up14.sh EXTRA_DIST = license-status maketags.sh version_tag.pl.in lc_common.sh \ - lustre_config.sh.in lc_modprobe.sh.in lc_net.sh.in lc_hb.sh.in lc_mon.sh \ - lc_cluman.sh.in lc_servip.sh lustre_createcsv.sh.in lustre_up14.sh + $(addsuffix .in,$(genscripts)) lc_mon.sh lc_servip.sh \ + lustre_up14.sh scriptlibdir = $(libdir)/@PACKAGE@ scriptlib_DATA = lc_common.sh -lustre_config.sh: lustre_config.sh.in - sed -e 's#@scriptlibdir@#$(scriptlibdir)#' < $(srcdir)/lustre_config.sh.in > lustre_config.sh - chmod +x lustre_config.sh - -lc_modprobe.sh: lc_modprobe.sh.in - sed -e 's#@scriptlibdir@#$(scriptlibdir)#' < $(srcdir)/lc_modprobe.sh.in > lc_modprobe.sh - chmod +x lc_modprobe.sh - -lc_net.sh: lc_net.sh.in - sed -e 's#@scriptlibdir@#$(scriptlibdir)#' < $(srcdir)/lc_net.sh.in > lc_net.sh - chmod +x lc_net.sh - -lc_hb.sh: lc_hb.sh.in - sed -e 's#@scriptlibdir@#$(scriptlibdir)#' < $(srcdir)/lc_hb.sh.in > lc_hb.sh - chmod +x lc_hb.sh - -lc_cluman.sh: lc_cluman.sh.in - sed -e 's#@scriptlibdir@#$(scriptlibdir)#' < $(srcdir)/lc_cluman.sh.in > lc_cluman.sh - chmod +x lc_cluman.sh +CLEANFILES = $(genscripts) -lustre_createcsv.sh: lustre_createcsv.sh.in - sed -e 's#@scriptlibdir@#$(scriptlibdir)#' < $(srcdir)/lustre_createcsv.sh.in > lustre_createcsv.sh - chmod +x lustre_createcsv.sh +$(genscripts): %.sh: %.sh.in + sed -e 's#@scriptlibdir@#$(scriptlibdir)#' < $< > $@ + chmod +x $@ -- 1.8.3.1