summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@slbdata.se>2010-01-02 19:54:21 +0100
committerSamuel Lidén Borell <samuel@slbdata.se>2010-01-02 22:42:50 +0100
commit79e68824b41dcc5ce80c34610245ecebc2d36a17 (patch)
tree404b9fe841e8bba8ac6b27284e1a43942a7ef701
parent15a46ab7c87a02e523f8cc0834eec516b2bb6861 (diff)
downloadfribid-79e68824b41dcc5ce80c34610245ecebc2d36a17.tar.gz
fribid-79e68824b41dcc5ce80c34610245ecebc2d36a17.tar.bz2
fribid-79e68824b41dcc5ce80c34610245ecebc2d36a17.zip
Fixed a bug in "make clean" caused by the previous Makefile changes
I "rewrote history" here to remove some personal information (especially my personal identity number) from some old commits in the repository. Previously, this commit had the following SHA1 identifier: c6e01776adcdc70d0d0e921fe32ffcedc3e8e497 (Actually the current version is an "amended" commit. The commit above was missing a small change that I added after the "history rewrite")
-rw-r--r--Makefile36
1 files changed, 17 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index f3adc43..d9a87dd 100644
--- a/Makefile
+++ b/Makefile
@@ -24,12 +24,9 @@ SUBDIRS=client plugin translations
DISTNAME=`./configure --internal--get-define=BINNAME`-`./configure --internal--get-define=PACKAGEVERSION`
-all subdirs-clean install uninstall:
+all clean install uninstall:
for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) $@) || exit $?; done
-clean: subdirs-clean
- rm -f ch-all.tmp ch-entry.tmp ch-other.tmp
-
distclean: clean
rm -f common/config.h
@@ -71,28 +68,29 @@ set-version: need-version
sync-changelog: need-version
# This rule syncs debian/changelog with CHANGELOG
- # Remove the current version (if present)
- cp debian/changelog ch-other.tmp
- [ `head -n 1 debian/changelog | sed -r 's/[^\s]+ \(([^)]+)\).*/\1/'` != "$$version" ] || \
- sed '/--/{:x n;bx}; d' debian/changelog | tail -n +3 > ch-other.tmp # is there a better way?
# Debianize the changelog entry for the current version
- echo "fribid ($$version) unstable; urgency=$${urgency:-low}" > ch-entry.tmp
- echo >> ch-entry.tmp
- sed "/^$$version - /{:x /^\n*$$/Q; n;bx };d" CHANGELOG | tail -n +2 >> ch-entry.tmp
- echo >> ch-entry.tmp
- echo " -- "`git config --get user.name`" <"`git config --get user.email`"> "`date -R` >> ch-entry.tmp
- echo >> ch-entry.tmp
- # Merge and add the changelog entry
- cat ch-entry.tmp ch-other.tmp > ch-all.tmp
+ echo "fribid ($$version) unstable; urgency=$${urgency:-low}" > changelog.tmp
+ echo >> changelog.tmp
+ sed "/^$$version - /{:x /^\n*$$/Q; n;bx };d" CHANGELOG | tail -n +2 >> changelog.tmp
+ echo >> changelog.tmp
+ echo " -- "`git config --get user.name`" <"`git config --get user.email`"> "`date -R` >> changelog.tmp \
+ || (rm -f changelog.tmp; false)
+ echo >> changelog.tmp
+ # Add previous changelog entries,
+ # but remove the current version (if present)
+ [ `head -n 1 debian/changelog | sed -r 's/[^\s]+ \(([^)]+)\).*/\1/'` != "$$version" ] \
+ && cat debian/changelog >> changelog.tmp \
+ || sed '/--/{:x n;bx}; d' debian/changelog | tail -n +3 >> changelog.tmp # is there a better way?
+ # Replace the changelog file with the new one
echo "$$version" | grep -qvF '-' \
- && mv ch-all.tmp debian/changelog \
+ && mv changelog.tmp debian/changelog \
|| echo "Debian versions entries are not synced from CHANGELOG"
- rm -f ch-all.tmp ch-entry.tmp ch-other.tmp
+ rm -f changelog.tmp
refresh-changelog-time: need-version
date=`date '+%F'` && \
sed -ri "s/^($$version - )([0-9?-]+)(.*)/\1$$date\3/" CHANGELOG
-.PHONY: all clean dist distdeb distdebsig distclean distsig install need-version prepare-release refresh-release-time set-version subdirs-clean sync-changelog uninstall $(SUBDIRS)
+.PHONY: all clean dist distdeb distdebsig distclean distsig install need-version prepare-release refresh-release-time set-version sync-changelog uninstall $(SUBDIRS)