print 'Please set LILYPOND_SOURCEDIR to the toplevel source, eg LILYPOND_SOURCEDIR=/home/foobar/lilypond-1.2.3/'
sys.exit(1)
- self.release_dir = self.topdir + '../releases/'
- self.patch_dir = self.topdir + '../patches/'
+ try:
+ self.groupdir = os.environ['LILYPOND_GROUPDIR'] + '/'
+ except KeyError:
+ self.groupdir = self.topdir + '../'
+
+ self.release_dir = self.groupdir + '/releases/'
+ self.patch_dir = self.groupdir + '/patches/'
def version_tuple(self):
f = open (self.topdir + 'VERSION')
def makepatch(fv, tv, patfile_nm):
import tempfile
prev_cwd = os.getcwd();
- os.chdir ('/tmp')
+ try:
+ os.mkdir ('/tmp/make-patch');
+ except:
+ pass
+
+ os.chdir ('/tmp/make-patch');
untar(released_tarball(fv))
untar(released_tarball(tv))
remove_automatic([dirname(fv), dirname(tv)])
sys.stderr.write('diffing to %s... ' % patfile_nm)
os.system('diff -urN ../%s . >> %s' % (dirname(fv), patfile_nm))
#os.system('gzip -9f %s' % patfile_nm)
- os.chdir('/tmp')
+ os.chdir('/tmp/make-patch')
sys.stderr.write('cleaning ... ')
os.system('rm -fr %s %s' % (dirname(tv), dirname(fv)))
self.write('\"%s\"\t' % str)
def print_f_dimen(self, f):
- self.write( '%.2f\\pt\t' % f);
+ dimstr = '%.2f' % f
+
+ # try to mask rounding errors
+ if (dimstr == '-0.00'):
+ dimstr = '0.00'
+ self.write( dimstr +'\\pt\t');
def print_dimen(self, str):
self.print_f_dimen(atof(str))
os.system('make dist')
cur_ver = lilydirs.version_tuple()
print tarball(cur_ver)
-os.rename('out/' + tarball(cur_ver), released_tarball(cur_ver))
-os.chdir('../test')
+try:
+ os.rename('out/' + tarball(cur_ver), released_tarball(cur_ver))
+except posix.error:
+ os.system('cp out/' + tarball(cur_ver) + ' ' + released_tarball(cur_ver))
+ os.unlink('out/' + tarball (cur_ver))
+
+os.chdir(lilydirs.groupdir + '/test')
os.system('pwd')
os.system('rm ../test/*gz')
-os.link(released_tarball(cur_ver), tarball(cur_ver))
+#huh?
+#os.symlink(released_tarball(cur_ver), tarball(cur_ver))
+
+try:
+ os.link(released_tarball(cur_ver), tarball(cur_ver))
+except posix.error:
+ os.system('cp ' + released_tarball(cur_ver) + ' '+ tarball(cur_ver))
# not a module, but a script (JCN)
# makepatch.main()
$(depth)/%.txt: check-doc-deps
rm -f $@
- ln `find ${depth}/Documentation -name $@|head -1` .
+ ln `find ${depth}/Documentation -name $@ -print|head -1 ` .
dist:
-mkdir $(distdir)
$(MAKE) localdist
- chmod -Rf a+rX $(distdir)
+ chmod -R a+r $(distdir)
+ chmod a+x `find $(distdir) -type d -print`
(cd ./$(depth)/$(outdir); $(TAR) cf - $(DIST_NAME) | gzip -9 > $(DIST_NAME).tar.gz)
INSTALL.txt: check-doc-deps check-mf-deps
rm -f INSTALL.txt
- ln `$(FIND) ./ -name INSTALL.txt|head -1` .
+ ln `$(FIND) ./ -name INSTALL.txt -print |head -1` .
# all machine generated junk resides in out/
distclean:
- set -e; for i in `find -type d -name 'out'`; do \
+ set -e; for i in `find . -type d -name 'out' -print`; do \
rm -f $$i/* $$i/.build; done
rm -rf *-build-dir
( cd flower && rm -f config.cache config.status config.log )
echo '# WARNING WARNING WARNING WARNING' > $@
echo '# do not edit! this is generated from make/Toplevel.make.in' >> $@
cat $< >> $@
+ chmod -w $@