2008-06-05 14:05:55 +00:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
|
|
|
# This script creates a "configure" script and a Makefile to imitate autotools
|
|
|
|
# but Waf is actually used to build
|
|
|
|
|
2008-10-02 16:10:45 +00:00
|
|
|
WAF="waf"
|
|
|
|
(waf --version) < /dev/null > /dev/null 2>&1 || {
|
2008-06-05 14:05:55 +00:00
|
|
|
WAF="./waf"
|
2008-10-02 16:10:45 +00:00
|
|
|
}
|
2008-06-05 14:05:55 +00:00
|
|
|
|
2008-06-11 17:03:01 +00:00
|
|
|
# Makefile
|
2008-06-05 14:05:55 +00:00
|
|
|
cat > Makefile << EOF
|
|
|
|
|
|
|
|
.PHONY: build configure
|
|
|
|
|
|
|
|
all: build
|
|
|
|
|
|
|
|
build:
|
2009-03-27 15:39:36 +00:00
|
|
|
@$WAF build
|
2008-06-05 14:05:55 +00:00
|
|
|
|
|
|
|
install:
|
2009-03-27 15:39:36 +00:00
|
|
|
@if test -n "\$(DESTDIR)"; then \\
|
|
|
|
./waf install --destdir="\$(DESTDIR)"; \\
|
|
|
|
else \\
|
|
|
|
./waf install; \\
|
|
|
|
fi;
|
2008-06-05 14:05:55 +00:00
|
|
|
|
|
|
|
uninstall:
|
2009-03-27 15:39:36 +00:00
|
|
|
@if test -n "\$(DESTDIR)"; then \\
|
|
|
|
$WAF uninstall --destdir="\$(DESTDIR)"; \\
|
|
|
|
else \\
|
|
|
|
$WAF uninstall; \\
|
|
|
|
fi;
|
2008-06-05 14:05:55 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
@$WAF clean
|
|
|
|
|
|
|
|
distclean:
|
|
|
|
@$WAF distclean
|
|
|
|
@-rm -f Makefile
|
|
|
|
|
|
|
|
htmldoc:
|
|
|
|
@$WAF --htmldoc
|
|
|
|
|
|
|
|
apidoc:
|
|
|
|
@$WAF --apidoc
|
|
|
|
|
|
|
|
configure:
|
2009-03-27 15:39:36 +00:00
|
|
|
@$WAF configure
|
2008-06-05 14:05:55 +00:00
|
|
|
|
|
|
|
EOF
|
|
|
|
|
2009-03-27 15:39:36 +00:00
|
|
|
template="
|
2008-06-11 17:03:01 +00:00
|
|
|
all: build
|
|
|
|
|
|
|
|
build:
|
2009-03-27 15:39:36 +00:00
|
|
|
cd .. && $WAF build
|
2008-06-11 17:03:01 +00:00
|
|
|
|
2009-03-27 15:39:36 +00:00
|
|
|
"
|
2008-06-11 17:03:01 +00:00
|
|
|
|
2009-03-27 15:39:36 +00:00
|
|
|
echo "$template" > src/Makefile
|
|
|
|
echo "$template" > tagmanager/Makefile
|
|
|
|
echo "$template" > scintilla/Makefile
|
|
|
|
echo "$template" > plugins/Makefile
|
2008-06-11 17:03:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
# configure
|
2008-06-05 14:05:55 +00:00
|
|
|
cat > configure << EOF
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
$WAF configure \$@
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod 755 configure
|