Commit 65a9bb33 authored by Matthew's avatar Matthew Committed by Craig Keogh

add Makefile and other tools for windows

The included install-check.c file will not compile on windows without
some work so provide a sh script that falls through to using /usr/bin/install
parent 7266997e
PACKAGE = jhbuild
VERSION = 0.1
CC = gcc
CFLAGS = -Wall -O2
MAKE ?= make
-include Makefile.inc
all: include-check
@echo 'Run "make install" to install.'
include-check:
@test -f Makefile.inc || \
(echo "Makefile.inc doesn't exist. Please run autogen.sh"; exit 1)
update:
git pull --rebase
install: include-check
@echo "Creating $(bindir)/jhbuild"
@mkdir -p $(bindir)
@sed -e "s,@jhbuilddir@,`pwd -W`,g" \
-e "s,USE_CHECKOUT_SRC = False,USE_CHECKOUT_SRC = True," < \
scripts/jhbuild.in > $(bindir)/jhbuild
@chmod a+x $(bindir)/jhbuild
@cp install-check.sh $(bindir)/install-check
@chmod a+x $(bindir)/install-check
# if ~/bin/jbuild exists, it is most likely an old version, and it will
# not work; so rename it and install a symlink to the new version
# instead.
@if [ -e "$(HOME)/bin/jhbuild" ] && [ ! $(bindir) -ef $(HOME)/bin ]; then \
mv "$(HOME)/bin/jhbuild" "$(HOME)/bin/jhbuild.old" ; \
ln -s $(bindir)/jhbuild "$(HOME)/bin/jhbuild" ; \
fi
.PHONY: all update install
......@@ -97,11 +97,17 @@ parse_commandline()
}
# configure JHBuild to build and install without autotools via a plain
# Makefile. Sets up a Makefile.inc and copies Makefile.plain to Makefile
# Makefile. Sets up a Makefile.inc and copies Makefile.plain or
# Makefile.windows to Makefile
configure_without_autotools()
{
eval_gettext "Configuring \$PKG_NAME without autotools"; echo
makefile="$srcdir/Makefile.plain"
if [ "x$MSYSTEM" != "x" ]; then
makefile="$srcdir/Makefile.windows"
fi
# setup the defaults. The following can changed from the commandline.
# e.g. ./autogen.sh --prefix=${HOME}/jhbuildhome
[ -z $prefix ] && prefix=${HOME}/.local
......@@ -131,13 +137,13 @@ configure_without_autotools()
echo "datarootdir=$datarootdir" >> $srcdir/Makefile.inc
echo "desktopdir=$desktopdir" >> $srcdir/Makefile.inc
if [ ! -f $srcdir/Makefile.plain ]; then
eval_gettext "Unable to read file $srcdir/Makefile.plain"; echo
if [ ! -f $makefile ]; then
eval_gettext "Unable to read file \$makefile"; echo
exit 1
fi
cp $srcdir/Makefile.plain $srcdir/Makefile || {
eval_gettext "Unable to copy \$srcdir/Makefile.plain to \$srcdir/Makefile"
cp $makefile $srcdir/Makefile || {
eval_gettext "Unable to copy \$makefile to \$srcdir/Makefile"
echo
exit 1
}
......
#!/bin/sh
/usr/bin/install $*
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment