7 echo Usage
: $0 \
<directory\
>
12 # fixme: modular dir should
14 MODULAR_DIR
=`( cd $1 ; cd ../.. ; pwd )`
15 MODULE_DIR
=`( cd $1 ; pwd )`
16 MODULE_NAME
=`( basename $MODULE_DIR )`
17 modulename
=`echo $MODULE_NAME | tr "[:upper:]" "[:lower:]"`
20 echo Modular dir
: $MODULAR_DIR
21 echo Module dir
: $MODULE_DIR
22 echo Name
: $MODULE_NAME
23 echo lower
: $modulename
24 echo Man dir
: $HAS_MAN_DIR
25 echo Include dir
: $HAS_INCLUDE_DIR
40 # Generate Makefile.am
44 cat <<EOF >> Makefile.am
46 # Copyright 2005 Red Hat, Inc.
48 # Permission to use, copy, modify, distribute, and sell this software and its
49 # documentation for any purpose is hereby granted without fee, provided that
50 # the above copyright notice appear in all copies and that both that
51 # copyright notice and this permission notice appear in supporting
52 # documentation, and that the name of Red Hat not be used in
53 # advertising or publicity pertaining to distribution of the software without
54 # specific, written prior permission. Red Hat makes no
55 # representations about the suitability of this software for any purpose. It
56 # is provided "as is" without express or implied warranty.
58 # RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
59 # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
60 # EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
61 # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
62 # DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
63 # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
64 # PERFORMANCE OF THIS SOFTWARE.
66 bin_PROGRAMS = $modulename
68 ${modulename}_CFLAGS = \$(DEP_CFLAGS)
69 ${modulename}_LDADD = \$(DEP_LIBS)
71 ${modulename}_SOURCES = \\
76 for x
in `ls *.[ch]` ; do
80 for x
in `ls *.[ch]`; do
81 if [ $x = $LAST ] ; then
82 echo \ \ \ \ \ \ \ \
$x >> Makefile.am
84 echo \ \ \ \ \ \ \ \
$x \\ >> Makefile.am
93 for x
in `ls *.man` ; do
97 if [ ! -z $LAST ] ; then
98 echo dist_man_MANS
= \\ >> Makefile.am
99 for x
in `ls *.man` ; do
100 if [ $x = $LAST ] ; then
101 echo \ \ \ \ \ \ \ \
$x >> Makefile.am
103 echo \ \ \ \ \ \ \ \
$x \\ >> Makefile.am
113 for x
in `ls *.ad` ; do
117 if [ ! -z $LAST ] ; then
118 cat <<EOF >> Makefile.am
119 # App default files (*.ad)
121 appdefaultdir = \$(sysconfdir)/X11/app-defaults
125 cat <<EOF >> Makefile.am
130 for x
in `ls *.ad` ; do
131 FILE
=`echo $x | sed 's/\.ad//'`
132 if [ $x = $LAST ] ; then
133 echo \ \ \ \ \ \ \ \
$FILE >> Makefile.am
135 echo \ \ \ \ \ \ \ \
$FILE \\ >> Makefile.am
139 cat <<EOF >> Makefile.am
146 appdefault_DATA = \$(APPDEFAULTFILES)
148 EXTRA_DIST = \$(APPDEFAULTFILES:%=%.ad)
150 CLEANFILES = \$(APPDEFAULTFILES)
155 # Generate configure.ac
158 cat <<EOF >> $MODULE_DIR/configure.ac
160 dnl Copyright 2005 Red Hat, Inc.
162 dnl Permission to use, copy, modify, distribute, and sell this software and its
163 dnl documentation for any purpose is hereby granted without fee, provided that
164 dnl the above copyright notice appear in all copies and that both that
165 dnl copyright notice and this permission notice appear in supporting
166 dnl documentation, and that the name of Red Hat not be used in
167 dnl advertising or publicity pertaining to distribution of the software without
168 dnl specific, written prior permission. Red Hat makes no
169 dnl representations about the suitability of this software for any purpose. It
170 dnl is provided "as is" without express or implied warranty.
172 dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
173 dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
174 dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
175 dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
176 dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
177 dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
178 dnl PERFORMANCE OF THIS SOFTWARE.
180 dnl Process this file with autoconf to create configure.
183 AC_INIT($modulename,[7.0], [xorg@freedesktop.org],$modulename)
184 AM_INIT_AUTOMAKE([dist-bzip2])
187 AM_CONFIG_HEADER(config.h)
192 # Checks for pkg-config packages
193 PKG_CHECK_MODULES(DEP, x11)
197 AC_OUTPUT([Makefile])
202 cat <<EOF >> autogen.sh
205 srcdir=\`dirname \$0\`
206 test -z "\$srcdir" && srcdir=.
211 autoreconf -v --install || exit 1
212 cd \$ORIGDIR || exit \$?
214 \$srcdir/configure --enable-maintainer-mode "\$@"