Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (38 sloc) 1.54 KB
# Project name from the X.xcodeproj directory
PROJ = $(subst .xcodeproj,,$(wildcard *.xcodeproj))
# Marketing version
VERS = $(strip $(shell agvtool mvers -terse1))
DMG = $(DIST).dmg
DMGURL =$(PROJ)/files/$(DMG)
CONF = Release
OBJPATH = /tmp/build/$(CONF)/$(PROJDIR)
FWKPATH = /tmp/Frameworks/$(PROJ).framework
DOCS = $(shell find Documentation -type f)
SRC = $(shell find Classes -type f)
site: _site
_site: $(DOCS) $(SRC)
-rm -rf _site
doxygen Documentation/Doxyfile
find _site -type f | xargs perl -pi -e 's{__DMGURL__}{$(DMGURL)}g'
find _site -type f | xargs perl -pi -e 's{__PROJ__}{$(PROJ)}g'
find _site -type f | xargs perl -pi -e 's{__VERSION__}{$(VERS)}g'
upload-site: _site
curl --head $(DMGURL) 2>/dev/null | grep -q "200 OK"
rsync -ruv --delete _site/ --exclude files$(PROJ)/
dmg: $(DMG)
$(DMG): $(SRC) _site
-rm $(DMG)
-chmod -R +w $(DIST) && rm -rf $(DIST)
-chmod -R +w $(FWKPATH) && rm -rf $(FWKPATH)
-chmod -R +w /tmp/Frameworks/JSON.framework/ && rm -rf /tmp/Frameworks/JSON.framework/
xcodebuild -configuration $(CONF) -target $(PROJ) install
mkdir $(DIST)
cp -p -R $(FWKPATH) $(DIST)
cp -p -R _site $(DIST)/Documentation
cat Documentation/redirect.js > $(DIST)/Documentation.html
hdiutil create -fs HFS+ -volname $(DIST) -srcfolder $(DIST) $(DMG)
upload-dmg: $(DMG)
curl --head $(DMGURL) 2>/dev/null | grep -q "404 Not Found" || false
scp $(DMG)$(PROJ)/files/$(DMG)