Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions osx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,37 @@
# Externals
VERSIONS=2.059 1.074
TARGET_SITE=d-programming@digitalmars.com
TARGET_DIR=data/
TARGET_DIR=data
# TARGET_SITE=erdani.com
# TARGET_DIR=d

TEMPDIR:=$(shell mktemp -d /tmp/dmd-installer.XXX)

MAKER:=$(shell \
if [ -f /Developer/usr/bin/packagemaker ];\
then echo /Developer/usr/bin/packagemaker;\
else echo /Applications/PackageMaker.app/Contents/MacOS/PackageMaker;\
fi)

all: ${VERSIONS}
rm -rf ${TEMPDIR}

define MAIN
$1:
rm -rf ${TEMPDIR}/dmd.$1*.zip ${TEMPDIR}/dmd.$1* dmd dmg
curl --silent http://ftp.digitalmars.com/dmd.$1.zip >${TEMPDIR}/dmd.$1.zip
unzip -q ${TEMPDIR}/dmd.$1.zip -d ${TEMPDIR}/$1
rm -rf ${TEMPDIR}/$1/*/freebsd ${TEMPDIR}/$1/*/linux ${TEMPDIR}/$1/*/windows
./make.rb -d ${TEMPDIR}/$1/dmd* -o ${TEMPDIR}/dmd.$1
rm -rf $(addprefix ${TEMPDIR}/$1/*/,freebsd linux windows bin)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if this is necessary due to line 34.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yah, in fact the whole thing can be simplified by extracting straight into ./dmd/ - stay tuned.

mkdir -p dmd
cp -r $(addprefix ${TEMPDIR}/$1/dmd*/,html license.txt man README.TXT license.txt samples src osx/bin osx/lib) dmd/
cp dmd$2.conf dmd/bin/dmd.conf
mkdir -p dmg/DMD$2
cp uninstall.command dmg/DMD$2/
${MAKER} -d dmd$2.pmdoc -o dmg/DMD2/DMD$2.pkg
hdiutil create -srcfolder dmg/DMD$2 ${TEMPDIR}/dmd.$1.dmg
scp ${TEMPDIR}/dmd.$1.dmg ${TARGET_SITE}:${TARGET_DIR}/dmd.$1.dmg.tmp
ssh ${TARGET_SITE} "mv ${TARGET_DIR}/dmd.$1.dmg.tmp ${TARGET_DIR}/dmd.$1.dmg"
endef

$(foreach VER,$(VERSIONS),$(eval $(call MAIN,$(VER))))
$(foreach VER,$(VERSIONS),$(eval $(call MAIN,$(VER),$(firstword $(subst ., ,$(VER))))))

109 changes: 0 additions & 109 deletions osx/make.rb

This file was deleted.