mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 01:01:27 +00:00
Makefile: Rework the code for generation of a source code distribution archive
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7348 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
40
Makefile
40
Makefile
@@ -407,25 +407,35 @@ fcst_clean:
|
||||
fcst_extraclean:
|
||||
cd $(FCST_DIR) && $(MAKE) extraclean
|
||||
|
||||
scst-dist-gzip:
|
||||
# Make an SCST source code archive. $(1) is the tar compression option, $(2)
|
||||
# is the tar filename compression suffix, $(3) is the version and $(4) is the
|
||||
# source file filter.
|
||||
make-scst-dist = \
|
||||
[ -n "$(1)" ] && [ -n "$(2)" ] && [ -n "$(3)" ] && \
|
||||
[ -n "$(4)" ] && \
|
||||
name=scst && \
|
||||
mkdir $${name}-$(VERSION) && \
|
||||
mkdir "$${name}-$(3)" && \
|
||||
{ \
|
||||
if [ -e qla2x00t_git ]; then \
|
||||
scripts/list-source-files | grep -v ^qla2x00t/; \
|
||||
( dir="$$PWD" && cd qla2x00t_git && \
|
||||
"$$dir/scripts/list-source-files" ) | \
|
||||
sed 's,^,qla2x00t_git/,'; \
|
||||
else \
|
||||
scripts/list-source-files; \
|
||||
fi | \
|
||||
grep -E '^doc/|^fcst/|^iscsi-scst/|^Makefile|^qla2x00t(|_git)/|^scst.spec|^scst/|^scst_local/|^srpt/|^usr/|^scstadmin/'|\
|
||||
{ \
|
||||
if [ -e qla2x00t_git ]; then \
|
||||
scripts/list-source-files | grep -v ^qla2x00t/; \
|
||||
( dir="$$PWD" && cd qla2x00t_git && \
|
||||
"$$dir/scripts/list-source-files" ) | \
|
||||
sed 's,^,qla2x00t_git/,'; \
|
||||
else \
|
||||
scripts/list-source-files; \
|
||||
fi; \
|
||||
} | \
|
||||
$(4) | \
|
||||
tar -T- -cf- | \
|
||||
tar -C $${name}-$(VERSION) -xf-; \
|
||||
tar -C "$${name}-$(3)" -xf-; \
|
||||
} && \
|
||||
rm -f $${name}-$(VERSION).tar.bz2 && \
|
||||
tar -cjf $${name}-$(VERSION).tar.bz2 $${name}-$(VERSION) && \
|
||||
rm -rf $${name}-$(VERSION)
|
||||
rm -f "$${name}-$(3).tar.$(2)" && \
|
||||
tar -c$(1) -f "$${name}-$(3).tar.$(2)" "$${name}-$(3)" && \
|
||||
rm -rf "$${name}-$(3)"
|
||||
|
||||
scst-dist-gzip:
|
||||
$(call make-scst-dist,j,bz2,$(VERSION),grep -E '^doc/|^fcst/|^iscsi-scst/|^Makefile|^qla2x00t(|_git)/|^scst.spec|^scst/|^scst_local/|^srpt/|^usr/|^scstadmin/')
|
||||
|
||||
scst-rpm:
|
||||
name=scst && \
|
||||
|
||||
Reference in New Issue
Block a user