summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Hähnle <nhaehnle@gmail.com>2009-05-25 22:02:55 +0200
committerNicolai Hähnle <nhaehnle@gmail.com>2009-05-25 22:02:55 +0200
commitcea7a5da5e542c136e0a7429513bebbf21859a38 (patch)
treece5deb478afe2cd4f0415ce92849734e4eab959e
parentbc90ac3ef8512735bf9f7bfba3cf5f1b2742269b (diff)
Move Makefile into dxo
-rwxr-xr-xdetail/git_xorg.sh158
-rw-r--r--detail/main.makefile93
-rw-r--r--dxo-init4
-rwxr-xr-xdxo-make4
-rwxr-xr-xdxo-wip-make2
5 files changed, 259 insertions, 2 deletions
diff --git a/detail/git_xorg.sh b/detail/git_xorg.sh
new file mode 100755
index 0000000..d681477
--- /dev/null
+++ b/detail/git_xorg.sh
@@ -0,0 +1,158 @@
+#! /bin/sh
+#
+# Copyright (c) 2006 Matthieu Herrb
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Some updates by Brian Paul
+# XCB update and some cleanup by Peter Hutterer
+
+
+gitbase="git://anongit.freedesktop.org/git"
+
+# app="appres bdftopcf beforelight bitmap compiz constype editres fonttosfnt\
+# fslsfonts fstobdf glxcompmgr iceauth ico lbxproxy listres luit\
+# makepsres mkcfm mkfontdir mkfontscale oclock pclcomp proxymngr\
+# rendercheck rgb rstart scripts sessreg setxkbmap showfont smproxy\
+# twm viewres x11perf xauth xbiff xcalc xclipboard xclock xcmsdb\
+# xcompmgr xconsole xcursorgen xdbedizzy xditview xdm xdpyinfo\
+# xdriinfo xedit xev xeyes xf86dga xfd xfindproxy xfontsel xfs\
+# xfsinfo xfwp xgamma xgc xhost xinit xinput xkbcomp xkbevd xkbprint\
+# xkbutils xkill xload xlogo xlsatoms xlsclients xlsfonts xmag\
+# xman xmessage xmh xmodmap xmore xphelloworld xplsprinters xpr\
+# xprehashprinterlist xprop xrandr xrdb xrefresh xrestop xrx xset\
+# xsetmode xsetpointer xsetroot xshowdamage xsm xstdcmap xtrap \
+# xvidtune xvinfo xwd xwininfo xwud"
+app="xkbcomp"
+
+# data="bitmaps cursors"
+
+# doc="xorg-docs xorg-sgml-doctools"
+
+# driver="xf86-input-acecad xf86-input-aiptek xf86-input-calcomp\
+# xf86-input-citron xf86-input-digitaledge xf86-input-dmc\
+# xf86-input-dynapro xf86-input-elo2300 xf86-input-elographics\
+# xf86-input-evdev xf86-input-fpit xf86-input-hyperpen\
+# xf86-input-jamstudio xf86-input-joystick xf86-input-keyboard\
+# xf86-input-magellan xf86-input-magictouch xf86-input-microtouch\
+# xf86-input-mouse xf86-input-mutouch xf86-input-palmax\
+# xf86-input-penmount xf86-input-sample xf86-input-spaceorb\
+# xf86-input-summa xf86-input-tek4957 xf86-input-ur98\
+# xf86-input-vmmouse xf86-input-void xf86-video-apm\
+# xf86-video-ark xf86-video-ast xf86-video-ati\
+# xf86-video-chips xf86-video-cirrus xf86-video-cyrix\
+# xf86-video-dummy xf86-video-fbdev xf86-video-glide\
+# xf86-video-glint xf86-video-i128 xf86-video-i740\
+# xf86-video-impact xf86-video-imstt xf86-video-intel\
+# xf86-video-mga xf86-video-neomagic xf86-video-newport\
+# xf86-video-nsc xf86-video-nv xf86-video-rendition\
+# xf86-video-s3 xf86-video-s3virge xf86-video-savage\
+# xf86-video-siliconmotion xf86-video-sis xf86-video-sisusb\
+# xf86-video-sunbw2 xf86-video-suncg14 xf86-video-suncg3\
+# xf86-video-suncg6 xf86-video-sunffb xf86-video-sunleo\
+# xf86-video-suntcx xf86-video-tdfx xf86-video-tga\
+# xf86-video-trident xf86-video-tseng xf86-video-v4l\
+# xf86-video-vesa xf86-video-vga xf86-video-via\
+# xf86-video-vmware xf86-video-voodoo xf86-video-wsfb"
+driver="xf86-video-ati xf86-input-evdev"
+
+# font="adobe-100dpi adobe-75dpi adobe-utopia-100dpi adobe-utopia-75dpi\
+# adobe-utopia-type1 alias arabic-misc bh-100dpi bh-75dpi\
+# bh-lucidatypewriter-100dpi bh-lucidatypewriter-75dpi\
+# bh-ttf bh-type1 bitstream-100dpi bitstream-75dpi\
+# bitstream-speedo bitstream-type1 cronyx-cyrillic\
+# cursor-misc daewoo-misc dec-misc encodings ibm-type1\
+# isas-misc jis-misc micro-misc misc-cyrillic misc-ethiopic\
+# misc-meltho misc-misc mutt-misc schumacher-misc \
+# screen-cyrillic sony-misc sun-misc util winitzki-cyrillic\
+# xfree86-type1"
+
+#lib="libAppleWM libFS libICE libSM libWindowsWM libX11 libXRes\
+# libXScrnSaver libXTrap libXau libXaw libXcomposite libXcursor\
+# libXdamage libXdmcp libXevie libXext libXfixes libXfont\
+# libXfontcache libXft libXi libXinerama libXmu libXp\
+# libXpm libXprintAppUtil libXprintUtil libXrandr libXrender\
+# libXt libXtst libXv libXvMC libXxf86dga libXxf86misc\
+# libXxf86rush libXxf86vm libdmx libfontenc liblbxutil\
+# liboldX libpciaccess libxkbfile libxkbui libxtrans"
+lib="libXrandr libXxf86vm libXdamage libfontenc libXfont libXxf86dga libxtrans\
+ libXfixes libpciaccess libxkbfile libxkbui"
+
+# proto="applewmproto bigreqsproto compositeproto damageproto\
+# dmxproto evieproto fixesproto fontcacheproto\
+# fontsproto glproto inputproto kbproto panoramixproto\
+# pmproto printproto randrproto recordproto renderproto\
+# resourceproto scrnsaverproto trapproto videoproto \
+# windowswmproto x11proto xcmiscproto xextproto\
+# xf86bigfontproto xf86dgaproto xf86driproto xf86miscproto\
+# xf86rushproto xf86vidmodeproto xineramaproto"
+proto="glproto randrproto dri2proto xineramaproto renderproto\
+ xf86miscproto xf86driproto damageproto xf86vidmodeproto\
+ fixesproto xcmiscproto xextproto x11proto scrnsaverproto bigreqsproto\
+ resourceproto inputproto compositeproto evieproto\
+ fontcacheproto xf86dgaproto fontsproto"
+
+# util="cf gccmakedep imake install-check lndir macros makedepend\
+# modular xmkmf"
+util="cf gccmakedep imake install-check lndir macros makedepend\
+ modular xmkmf"
+
+xcb="proto libxcb pthread-stubs"
+
+mesa="mesa drm"
+
+# $1 is the main project path in the git repository (e.g. xorg).
+# $2 is the module's directory (e.g. lib)
+# $3 is the module name (e.g. libXi)
+# $1 and $2 can be '.', in which case they are ignored.
+# The path for git clone will be $gitbase/$1/$2/$3
+do_dir () {
+ dir=$2
+ if [ ! -d ${dir} ]; then
+ echo "creating ${dir}"
+ mkdir -p ${dir}
+ fi
+ for d in $3; do
+ if [ -d "${dir}/$d" ]; then
+ echo "${dir}/$d exists, pulling"
+ (cd "${dir}/$d" ; git pull)
+ else
+ echo "cloning ${dir}/${d}"
+ if [ $1 = '.' ] ; then
+ src="${gitbase}"
+ else
+ src="${gitbase}/$1"
+ fi
+
+ if [ ${dir} = '.' ] ; then
+ src="${src}/$d"
+ else
+ src="${src}/${dir}/$d"
+ fi
+ (cd "${dir}" ; git clone ${src})
+ fi
+ done
+}
+
+do_dir xorg app "${app}"
+#do_dir xorg data "${data}"
+#do_dir xorg doc "${doc}"
+do_dir xorg driver "${driver}"
+do_dir xorg lib "${lib}"
+do_dir xorg proto "${proto}"
+do_dir xorg util "${util}"
+do_dir . . pixman
+do_dir xorg . xserver
+do_dir mesa . "${mesa}"
+do_dir . xcb "${xcb}"
+do_dir . . xkeyboard-config
diff --git a/detail/main.makefile b/detail/main.makefile
new file mode 100644
index 0000000..e65a135
--- /dev/null
+++ b/detail/main.makefile
@@ -0,0 +1,93 @@
+# Usage: Use dxo-make from anywhere to run this makefile in the right setting
+
+AUTOCONF_DIRS:=\
+ drm \
+ pixman \
+ util/macros \
+ proto/xf86dgaproto \
+ proto/glproto \
+ proto/randrproto \
+ proto/dri2proto \
+ proto/xineramaproto \
+ proto/renderproto \
+ proto/xf86miscproto \
+ proto/xf86driproto \
+ proto/fixesproto \
+ proto/damageproto \
+ proto/xf86vidmodeproto \
+ proto/xcmiscproto \
+ proto/xextproto \
+ proto/x11proto \
+ proto/scrnsaverproto \
+ proto/bigreqsproto \
+ proto/resourceproto \
+ proto/inputproto \
+ proto/compositeproto \
+ proto/evieproto \
+ proto/fontcacheproto \
+ proto/fontsproto \
+ lib/libXxf86vm \
+ lib/libXfixes \
+ lib/libXdamage \
+ lib/libfontenc \
+ lib/libXfont \
+ lib/libXxf86dga \
+ lib/libxtrans \
+ lib/libpciaccess \
+ lib/libxkbfile \
+ lib/libxkbui \
+ app/xkbcomp \
+ xkeyboard-config \
+ xserver \
+ driver/xf86-video-ati \
+ driver/xf86-input-evdev
+
+
+DIRS:=$(AUTOCONF_DIRS) \
+ mesa
+
+DIRTARGETS:=$(patsubst %,%.dir,$(DIRS))
+
+.PHONY: default build
+
+default:
+ @echo "Implemented targets:"
+ @echo " autoconf Run autogen / configure in all dirs"
+ @echo " build Build all (including nonofficial)"
+ @echo " deadlights Push custom installation to deadlights"
+ @echo " pull Pull all official git repositories"
+ @echo " kernel Build kernel at repos/kernel"
+
+autoconf: $(patsubst %,repos/%.autoconf,$(AUTOCONF_DIRS))
+
+%.autoconf:
+ @echo
+ @echo "======================================="
+ @echo "Autogen in: $*"
+ @echo "======================================="
+ @cd $* && ./autogen.sh --prefix=$(DXO_PREFIX) --enable-debug
+
+build: $(DIRTARGETS) build_piglit
+
+build_piglit:
+ @make -j8 -C piglit/repo all
+
+kernel:
+ cd repos/kernel && CONCURRENCY_LEVEL=10 fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image
+
+%.dir:
+ @echo
+ @echo "======================================="
+ @echo "Building and installing: $*"
+ @echo "======================================="
+ @make -j8 -C repos/$* install
+ @echo "======================================="
+ @echo
+
+
+pull:
+ @cd repos; ${DXO_SCRIPTS}/detail/git_xorg.sh
+
+deadlights:
+ @cp repos/*.deb prefix/kernel
+ @rsync -acR --stats --progress -e ssh prefix piglit/repo deadlights:/home/prefect/dev/xorg/
diff --git a/dxo-init b/dxo-init
index ad7435d..7ec5a3c 100644
--- a/dxo-init
+++ b/dxo-init
@@ -31,4 +31,6 @@ export DXO_SCRIPTS
export DXO_PATH
export DXO_PREFIX
-echo "Setup X.Org development environment."
+echo "Welcome to the X.Org development environment."
+cmds=`find ${DXO_SCRIPTS} -maxdepth 1 -type f -executable ! -name \*~ -printf '%f '`
+echo "Available commands: ${cmds}"
diff --git a/dxo-make b/dxo-make
new file mode 100755
index 0000000..bfe9eb5
--- /dev/null
+++ b/dxo-make
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+cd ${DXO_PATH}
+make -f ${DXO_SCRIPTS}/detail/main.makefile $1
diff --git a/dxo-wip-make b/dxo-wip-make
index 6b11a16..ea71cfa 100755
--- a/dxo-wip-make
+++ b/dxo-wip-make
@@ -3,4 +3,4 @@
# Compiles the current project, makes a Work-in-Progress commit and upload
# to deadlights
-make -j10 install && git commit -a -m "WIP" && cd ${DXO_PATH} && make deadlights
+make -j10 install && git commit -a -m "WIP" && dxo-make deadlights