Skip to content

Commit 0dc2a62

Browse files
author
glynn
committed
Add version number back into src tar file as expected by create-rpm
git-svn-id: https://gforge.info.ucl.ac.be/svn/mozart@15956 ada56829-ad1f-0410-b00f-83cda6628aec
1 parent cc198aa commit 0dc2a62

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

Makefile.in

+10-9
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ OZTOOL = @VAR_OZTOOL@
1111
PLATFORM = $(shell $(OZTOOL) platform)
1212
NOTDIRSRCDIR = $(notdir $(SRCDIR))
1313
BUILDDATE = $(shell date '+%Y%m%d')
14+
VERSION = $(shell $(OZTOOL) version)
1415

1516
ifeq ($(PLATFORM),win32-i486)
1617
OZEMULATOR = $(shell $(CYGPATH) $(PREFIX)/platform/win32-i486/emulator.dll)
@@ -53,27 +54,27 @@ distclean: clean
5354
COMPRESS= gzip -9
5455
TAR= tar
5556
PACKDIR= /tmp/pack
56-
INSTALL_DIR= @INSTALL@
57+
INSTALL_DIR= @INSTALL@ -d
5758

5859
src: $(PACKDIR)
5960
echo "[" $(NOTDIRSRCDIR) "]"
6061
test -n "$(NOTDIRSRCDIR)" || { echo "bad"; exit 1; }
6162
## Create empty temp directory
62-
-rm -rf $(PACKDIR)/mozart-$(BUILDDATE)-std
63-
mkdir $(PACKDIR)/mozart-$(BUILDDATE)-std
63+
-rm -rf $(PACKDIR)/mozart-$(VERSION).$(BUILDDATE)-std
64+
mkdir $(PACKDIR)/mozart-$(VERSION).$(BUILDDATE)-std
6465
## Move source files to temp directory
65-
cd $(PACKDIR)/mozart-$(BUILDDATE)-std && \
66+
cd $(PACKDIR)/mozart-$(VERSION).$(BUILDDATE)-std && \
6667
((cd $(SRCDIR) && $(TAR) -cf - .) | tar -xf -)
6768
## Remove CVS cruft
6869
cd $(PACKDIR) && \
69-
(tbr=`find $(PACKDIR)/mozart-$(BUILDDATE)-std -name CVS -type d 2>/dev/null` ; \
70+
(tbr=`find $(PACKDIR)/mozart-$(VERSION).$(BUILDDATE)-std -name CVS -type d 2>/dev/null` ; \
7071
rm -rf $$tbr ; \
71-
find $(PACKDIR)/mozart-$(BUILDDATE)-std -name '.cvsignore' -type f -exec rm -f '{}' ';' ;) \
72+
find $(PACKDIR)/mozart-$(VERSION).$(BUILDDATE)-std -name '.cvsignore' -type f -exec rm -f '{}' ';' ;) \
7273
## tar up and compress
73-
(cd $(PACKDIR) && $(TAR) -cf - mozart-$(BUILDDATE)-std) | \
74-
$(COMPRESS) > mozart-$(BUILDDATE)-std.tar.gz
74+
(cd $(PACKDIR) && $(TAR) -cf - mozart-$(VERSION).$(BUILDDATE)-std) | \
75+
$(COMPRESS) > mozart-$(VERSION).$(BUILDDATE)-std.tar.gz
7576
## remove temp directory
76-
rm -rf $(PACKDIR)/mozart-$(BUILDDATE)-std
77+
rm -rf $(PACKDIR)/mozart-$(VERSION).$(BUILDDATE)-std
7778

7879
$(PACKDIR):
7980
INSTALL_DIR_CHMOD=777; export INSTALL_DIR_CHMOD && $(INSTALL_DIR) $@

0 commit comments

Comments
 (0)