Non-existence of _POSIX_VDISABLE is now non-fatal
[mdsms.git] / autogen.sh
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3
4 # $Id$
5
6 # /lib/gconv/ISO8859-2.so is apparently clashing with EFence. :-(
7 CONFDEFS="--enable-maintainer-mode --enable-debug --without-efence"
8
9 if [ "$1" = rpm -o "$1" = rpmup ];then
10   ./autogen.sh
11   make
12   make dist
13   cp mdsms-[0-9]*.tar.gz /usr/src/redhat/SOURCES
14   rpm -ba --sign mdsms.spec
15   make dist-tarZ
16   rm /usr/src/redhat/SOURCES/mdsms-[0-9]*.tar.gz
17   mv /usr/src/redhat/SRPMS/mdsms-[0-9]*-*.src.rpm .
18   mv /usr/src/redhat/RPMS/i386/mdsms-[0-9]*-*.i386.rpm .
19   ls -l mdsms-[0-9]*
20   if [ "$1" = rpm ];then exit;fi
21   echo "Uploading $[`cat mdsms-[0-9]*|wc -c`] bytes..."
22 # tar cf - mdsms-[0-9]*|ssh twilight ssh atrey.karlin.mff.cuni.cz 'cd WWW/sw\;tar xvvf -'
23   scp -v mdsms-[0-9]* atrey.karlin.mff.cuni.cz:WWW/sw/
24   exit
25 fi
26
27 # if [ -f Makefile ];then touch ChangeLog;make maintainer-clean;fi
28 rm -r -f \
29   `find -name "*~"` \
30   errs* \
31   `find po -type f -not '(' -name POTFILES.in -o -name "*.po" -o -name ".cvsignore" -o -path "po/CVS*" ')'` \
32   intl \
33   install-sh \
34   mkinstalldirs \
35   missing \
36   INSTALL \
37   COPYING \
38   ABOUT-NLS \
39   Makefile \
40   Makefile.in \
41   */Makefile \
42   */Makefile.in \
43   configure \
44   configure.scan \
45   config.guess \
46   config.status \
47   config.sub \
48   config.log \
49   config.h \
50   confdefs.h \
51   conftest* \
52   autoh[0-9]* \
53   config.cache \
54   config.h.in \
55   stamp-h \
56   stamp-h.in \
57   aclocal.m4 \
58   getopt.c \
59   getopt.h \
60   getopt1.c \
61   need-declaration.m4 \
62   strdup.c \
63   usleep.c \
64   memmove.c \
65   mdsms.1 \
66   mdsms.1.in2 \
67   mdsms \
68   mdsms-[0-9]* \
69   mdsms.spec \
70   manfmt \
71   .deps \
72   ChangeLog \
73   *.o \
74   tags \
75   TAGS \
76
77
78 if [ "$1" = clean ];then exit;fi
79
80   d="`pwd`"
81   (cd $HOME/src/misc
82    (cd getopt
83     cp getopt.c getopt.h getopt1.c $d
84    )
85    (cd macros
86     cp need-declaration.m4 $d
87    )
88    cp strdup.c usleep.c memmove.c $d
89   )
90
91 aclocal -I .
92 gettextize --copy
93 autoheader
94 touch ChangeLog
95 automake --gnu -c --add-missing
96 rm -f ChangeLog
97 cp $HOME/src/misc/LGPL2.1 COPYING
98 ed po/Makefile.in.in <<HERE
99 ,s/prefix = @/prefix = \$(DESTDIR)@/g
100 w
101 HERE
102 autoheader
103 autoconf
104
105 if [ "$1" = dist ];then
106   exit
107 fi
108 ./configure $CONFDEFS