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
142 \$(APPDEFAULTFILES): %: %.ad
145 appdefault_DATA = \$(APPDEFAULTFILES)
147 EXTRA_DIST = \$(foreach FILE, \$(APPDEFAULTFILES), \$(FILE).ad)
149 CLEANFILES = \$(APPDEFAULTFILES)
154 # Generate configure.ac
157 cat <<EOF >> $MODULE_DIR/configure.ac
159 dnl Copyright 2005 Red Hat, Inc.
161 dnl Permission to use, copy, modify, distribute, and sell this software and its
162 dnl documentation for any purpose is hereby granted without fee, provided that
163 dnl the above copyright notice appear in all copies and that both that
164 dnl copyright notice and this permission notice appear in supporting
165 dnl documentation, and that the name of Red Hat not be used in
166 dnl advertising or publicity pertaining to distribution of the software without
167 dnl specific, written prior permission. Red Hat makes no
168 dnl representations about the suitability of this software for any purpose. It
169 dnl is provided "as is" without express or implied warranty.
171 dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
172 dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
173 dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
174 dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
175 dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
176 dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
177 dnl PERFORMANCE OF THIS SOFTWARE.
179 dnl Process this file with autoconf to create configure.
182 AC_INIT($modulename,[7.0], [xorg@freedesktop.org],$modulename)
183 AM_INIT_AUTOMAKE([dist-bzip2])
186 AM_CONFIG_HEADER(config.h)
191 # Checks for pkg-config packages
192 PKG_CHECK_MODULES(DEP, x11)
196 AC_OUTPUT([Makefile])
201 cat <<EOF >> autogen.sh
204 srcdir=\`dirname \$0\`
205 test -z "\$srcdir" && srcdir=.
210 autoreconf -v --install || exit 1
211 cd \$ORIGDIR || exit \$?
213 \$srcdir/configure --enable-maintainer-mode "\$@"