[stgt] [PATCH] Build process makeover

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Thu Oct 1 13:42:16 CEST 2009


On Thu,  1 Oct 2009 13:06:25 +0200
Florian Haas <florian.haas at linbit.com> wrote:

> A fairly thorough makeover of the build system, with one Makefile per
> directory replacing the previous single Makefile in usr.
> 
> This adds some version detection magic and a "make tarball" target for
> conveniently rolling a tarball out of a git checkout.
> 
> Signed-off-by: Florian Haas <florian.haas at linbit.com>
> ---
>  Makefile          |  114 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  conf/Makefile     |   11 +++++
>  conf/targets.conf |    2 +
>  doc/Makefile      |   22 ++++++++++
>  scripts/Makefile  |   13 ++++++
>  usr/Makefile      |   22 +---------
>  6 files changed, 164 insertions(+), 20 deletions(-)
>  create mode 100644 Makefile
>  create mode 100644 conf/Makefile
>  create mode 100644 conf/targets.conf
>  create mode 100644 doc/Makefile
>  create mode 100644 scripts/Makefile

Thanks, the changes look fine but seems that it doesn't work as I
expected.

fujita at viola:/tmp/tgt$ git-am ~/Mail/inbox/235
Applying: Build process makeover
/tmp/tgt/.git/rebase-apply/patch:23: trailing whitespace.
# line).
/tmp/tgt/.git/rebase-apply/patch:49: trailing whitespace.
programs:
/tmp/tgt/.git/rebase-apply/patch:52: trailing whitespace.
install-programs:
/tmp/tgt/.git/rebase-apply/patch:60: trailing whitespace.
doc:
/tmp/tgt/.git/rebase-apply/patch:63: trailing whitespace.
install-doc:
warning: squelched 10 whitespace errors
warning: 15 lines add whitespace errors.

I can fix whitespace warnings (but please fix them next time)

fujita at viola:/tmp/tgt$ git-tag 0.9.10
fujita at viola:/tmp/tgt$ make tarball

fujita at viola:/tmp/tgt$ LANG=C make tarball
Makefile:13: version-stamp: No such file or directory
echo "VERSION ?= `git describe --tags HEAD | sed -e 's/^v//' -e 's/-/_/g'`" > version-stamp
make -j4 -C usr clean
make[1]: Entering directory `/tmp/tgt/usr'
rm -f *.[od] tgtd tgtadm tgtimg iscsi/*.[od] ibmvio/*.[od] fc/*.[od] fcoe/*.[od]
make[1]: Leaving directory `/tmp/tgt/usr'
make -j4 -C doc clean
make[1]: Entering directory `/tmp/tgt/doc'
make[1]: Nothing to be done for `clean'.
make[1]: Leaving directory `/tmp/tgt/doc'
make -j4 -C conf clean
make[1]: Entering directory `/tmp/tgt/conf'
make[1]: Nothing to be done for `clean'.
make[1]: Leaving directory `/tmp/tgt/conf'
make -j4 -C scripts clean
make[1]: Entering directory `/tmp/tgt/scripts'
make[1]: Nothing to be done for `clean'.
make[1]: Leaving directory `/tmp/tgt/scripts'
rm -f tgt-0.9.10.tar.bz2
make -j4 -C usr
make[1]: Entering directory `/tmp/tgt/usr'
cc -c -DUSE_SIGNALFD -D_GNU_SOURCE -I. -g -O2 -Wall -Wstrict-prototypes -fPIC -DTGT_VERSION=\"0.9.10\" tgtd.c -o tgtd.o
cc -c -DUSE_SIGNALFD -D_GNU_SOURCE -I. -g -O2 -Wall -Wstrict-prototypes -fPIC -DTGT_VERSION=\"0.9.10\" mgmt.c -o mgmt.o
cc -c -DUSE_SIGNALFD -D_GNU_SOURCE -I. -g -O2 -Wall -Wstrict-prototypes -fPIC -DTGT_VERSION=\"0.9.10\" target.c -o target.o


Hmm, why do I need to compile to build a tarball?

Then,

fujita at viola:/tmp/tgt$ tar tjf tgt-0.9.10.tar.bz2
tgt-0.9.10/Makefile
tgt-0.9.10/README
...
tgt-0.9.10/usr/libcrc32c.o
...

The tarball should not include object files.


And why can't we use git-archive?

Can't we avoid putting version-stamp file in tarballs (e.g. Can we set
the proper VERSION in Makefile)?
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list