Whamcloud - gitweb
LU-4319 build: Clean up rpms/srpm Make targets 26/8426/7
authorChristopher J. Morrone <morrone2@llnl.gov>
Wed, 27 Nov 2013 22:05:50 +0000 (14:05 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 17 Feb 2014 18:33:51 +0000 (18:33 +0000)
commit666c7580c8a6585479c5eecc316060a19142149d
tree72867528dc45841b2be0117e3e23c9e13b59fe08
parent5afd3300d1ded80f79dbea92d47d287ad75f463a
LU-4319 build: Clean up rpms/srpm Make targets

The "rpms" and "srpm" targets were unnecessarily complicated.  The rpms
target in particular has a very long shell script embedded in the
autoMakefile, which is not especially desirable.  Because of the embedded
shell script with its associated backslashes, we didn't use standard
autoconf/automake macros because we didn't want shell comments to appear
after line continuation.  To get around that, we need another layer of
variables to convert autoconf/automake variables into Make variables.

It gets rather difficult to read and modify.

Instead we move the scripting into autoconf m4 files, where scripting
is much easier (little line continuations necessary, far fewer escapes needed).
We also have direct access to the original variables, so we don't need
to hop through two or three files before we eventually find where
a variable gets set.

All of the decisions are made at configure time anyway, so constructing
the command line options for rpmbuild at configure time is the Right Thing
to do.

A nice side effect of this change is that one can now easily look at
the autoMakefile after running "./configure" and see exactly the command
line that will be passed to rpmbuild.

Change-Id: I10fcfa740d9e901805615c2262263cc1ea8552bf
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: http://review.whamcloud.com/8426
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
autoMakefile.am
config/lustre-build.m4