Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[3f68fe]: Makefile.linux Maximize Restore History

Download this file

Makefile.linux    124 lines (94 with data), 3.4 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Toplevel Makefile for Linux build of PasswordSafe
# TBD: Grok following from src/ui/wxWidgets/version.in
RELEASENUM := 0.91
RELEASE_SPECIAL := BETA
# Shouldn't change anything below here
.PHONY: all clean debug-clean release-clean debug release \
unicodedebug unicoderelease deb rpm rpmbuild tar signatures \
dist sha1sums upload upload-src svn-tag I18N help
RELEASENAME := $(RELEASENUM)$(RELEASE_SPECIAL)
RELEASEDIR := ./Releases/
TMPDIR := /tmp/pwsrc-$(shell echo $$$$)
MKDIR := mkdir -p
RM := /bin/rm -rf
SVN := svn
TAR := tar
ECHO := /bin/echo
GPG := /usr/bin/gpg
GPG_SIGN := $(GPG) --detach-sign --default-key $(GPG_KEY)
SHA1SUM := /usr/bin/sha1sum
UPLOAD_CMD := /usr/bin/rsync -avP -e ssh
UPLOAD_DST := ronys@frs.sourceforge.net:/home/frs/project/p/pa/passwordsafe/Linux-BETA/$(RELEASENUM)
SVN_REPO := https://passwordsafe.svn.sourceforge.net/svnroot/passwordsafe
SVN_TRUNK := $(SVN_REPO)/trunk/pwsafe/pwsafe
SVN_TAG := $(SVN_REPO)/tags
RELTAG = wx$(subst .,_,$(RELEASENAME))
all: I18N unicodedebug unicoderelease
unicodedebug unicoderelease:
$(MAKE) -C src/os/linux $@
$(MAKE) -C src/core $@
$(MAKE) -C src/ui/wxWidgets CONFIG=$@
debug:
$(MAKE) unicodedebug
release:
$(MAKE) unicoderelease
clean: debug-clean release-clean
debug-clean:
$(MAKE) CONFIG=unicodedebug -C src/os/linux clean
$(MAKE) CONFIG=unicodedebug -C src/core clean
$(MAKE) CONFIG=unicodedebug -C src/ui/wxWidgets clean
release-clean:
$(MAKE) CONFIG=unicoderelease -C src/os/linux clean
$(MAKE) CONFIG=unicoderelease -C src/core clean
$(MAKE) CONFIG=unicoderelease -C src/ui/wxWidgets clean
# dist prepares stuff for upload - deprecated for Linux, until
# we find an elegant way to tell deb and rpm distros apart.
dist:
@$(ECHO) "Run 'make deb' or 'make rpm' to bulid the respective package"
# rpmbuild is called as part of the rpmbuild invocation from install/rpm/Makefile,
# which we call via 'make rpm' from here.
rpmbuild: release I18N help
deb: release tar
@$(MKDIR) $(RELEASEDIR)
$(MAKE) -C install/$@ \
RELEASENAME=$(RELEASENAME) RELEASEDIR=../../$(RELEASEDIR)
$(MAKE) signatures sha1sums
rpm: release I18N
@$(MKDIR) $(RELEASEDIR)
$(MAKE) -C install/$@ \
RELEASENAME=$(RELEASENAME) RELEASEDIR=../../$(RELEASEDIR)
$(MAKE) signatures sha1sums
tar:
@$(MKDIR) $(TMPDIR) $(RELEASEDIR)
@echo -n "Exporting source tree..."
@$(SVN) export --quiet . $(TMPDIR)/pwsafe-$(RELEASENAME)
# Prune windows-only code (not for now - provide as a reference?)
# @$(RM) $(TMPDIR)/pwsafe-$(RELEASENAME)/src/{ui/Windows,Tools/Windows}
@echo -n "Creating tarball..."
@$(TAR) czf $(RELEASEDIR)pwsafe-$(RELEASENAME)-src.tgz -C $(TMPDIR) .
@$(RM) $(TMPDIR)
@echo "Done."
sha1sums:
(cd $(RELEASEDIR); $(SHA1SUM) *$(RELEASENAME)*)
signatures:
CMD := $(foreach file, $(wildcard $(RELEASEDIR)/*$(RELEASENAME)*), $(GPG_SIGN) $(file); )
$(CMD)
upload:
$(UPLOAD_CMD) \
$(wildcard $(RELEASEDIR)/passwordsafe-*$(RELEASENAME)*) \
$(UPLOAD_DST)
# Uploading source is a separate target as we only want to do this once,
# as oppoed to uploading the complied package, which we need to do per distro.
upload-src:
$(UPLOAD_CMD) \
$(wildcard $(RELEASEDIR)/pwsafe-*$(RELEASENAME)-src*) \
$(UPLOAD_DST)
svn-tag:
$(SVN) cp $(SVN_TRUNK) $(SVN_TAG)/$(RELTAG) -m "tag wx $(RELEASENAME) release"
I18N:
$(MAKE) -C src/ui/wxWidgets/I18N mos
help:
$(MAKE) -C help
# Local variables:
# mode: makefile
# End: