http://ftp.x.org/contrib/applications/xscreensaver-2.24.tar.gz
[xscreensaver] / Makefile.in
1 # Makefile.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski.
2 # the `../configure' script generates `Makefile' from this file.
3
4 @SET_MAKE@
5 srcdir          = @srcdir@
6 VPATH           = @srcdir@
7
8 SHELL           = /bin/sh
9 SUBDIRS         = utils driver hacks hacks/glx
10 TARFILES        = README README.VMS README.debugging INSTALL xscreensaver.lsm \
11                   configure configure.in Makefile.in config.h.in \
12                   config.h-vms install-sh setup.com config.guess \
13                   config.sub makevms.com screenblank.txt \
14                   xscreensaver.lsm.sh
15 TAR             = gtar
16 COMPRESS        = gzip --verbose --best
17 COMPRESS_EXT    = gz
18 # COMPRESS      = compress
19 # COMPRESS_EXT  = Z
20
21 MAKE_SUBDIR     = for dir in $(SUBDIRS) ; do ( cd $$dir ; $(MAKE) $@ ) ; done
22
23 all::
24         @$(MAKE_SUBDIR)
25 install:
26         @$(MAKE_SUBDIR)
27 install-program:
28         @$(MAKE_SUBDIR)
29 install-man:
30         @$(MAKE_SUBDIR)
31 install-strip:
32         @$(MAKE_SUBDIR)
33 uninstall:
34         @$(MAKE_SUBDIR)
35 uninstall-program:
36         @$(MAKE_SUBDIR)
37 uninstall-man:
38         @$(MAKE_SUBDIR)
39 depend:
40         @$(MAKE_SUBDIR)
41 distdepend:
42         @$(MAKE_SUBDIR)
43 TAGS: tags
44 tags:
45         @$(MAKE_SUBDIR)
46 clean:
47         @$(MAKE_SUBDIR)
48 distclean: clean
49         -rm -f config.h Makefile config.status config.cache config.log *~ "#"*
50         @$(MAKE_SUBDIR)
51
52 dist: tar
53
54 # This really makes me sick...
55 tar:
56         @                                                                   \
57   sh config.status ;                                                        \
58   $(MAKE) hack_configure ;                                                  \
59   $(MAKE) distdepend ;                                                      \
60   sh xscreensaver.lsm.sh > xscreensaver.lsm.$$$$ ;                          \
61   mv xscreensaver.lsm.$$$$ xscreensaver.lsm ;                               \
62   NAME=`sed -n                                                              \
63   's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/xscreensaver-\1/p' utils/version.h` ;  \
64   rm -f $$NAME ; ln -s . $$NAME ;                                           \
65   FILES= ;                                                                  \
66   for subdir in $(SUBDIRS) ; do                                             \
67     d=`pwd` ;                                                               \
68     cd $$subdir ;                                                           \
69     FILES="$$FILES `$(MAKE) echo_tarfiles                                   \
70       | grep -v '^.*make\['                                                 \
71       | sed \"s|^|$$subdir/|g;s| | $$subdir/|g\"                            \
72       ` ";                                                                  \
73     cd $$d ; done ;                                                         \
74   echo creating tar file $${NAME}.tar.$(COMPRESS_EXT)... ;                  \
75   $(TAR) -vchf -                                                            \
76     `echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" `       \
77    | $(COMPRESS) > $${NAME}.tar.$(COMPRESS_EXT) ;                           \
78   rm $$NAME
79
80
81 # This also makes me sick...
82 # autoconf generates a configure script that begins with a very hard to read,
83 # nearly impossible to customize --help blurb.  This horrid set of regexps
84 # go through and clean up the help text, by inserting whitespace and ripping
85 # out options we don't use.  Odds are good that this will fail with any version
86 # of autoconf other than 2.12.
87 #
88 hack_configure::
89         autoconf
90         @TMP=configure.$$$$ ;                                                \
91         echo "munging configure's --help message..." ;                       \
92         ( perl -e '                                                          \
93                 my $$file="";                                                \
94                 while (<>) { $$file .= $$_; }                                \
95                 $$_ = $$file;                                                \
96                                                                              \
97                 s/^(Configuration:)$$/\n$$1\n/m;                             \
98                 s/^(Directory and file names:)$$/\n$$1\n/m;                  \
99                 s/^  --sbindir=.*\n//m;                                      \
100                 s/^  --libexecdir.*\n//m;                                    \
101                 s/^  --datadir.*\n.*\n//m;                                   \
102                 s/^  --sysconfdir.*\n//m;                                    \
103                 s/^  --sharedstatedir.*\n.*\n//m;                            \
104                 s/^  --localstatedir.*\n//m;                                 \
105                 s/^  --infodir.*\n//m;                                       \
106                 s/^(Host type:)$$/\n$$1\n/m;                                 \
107                 s/\nFeatures and packages:\n.*library files are in DIR\n/\n/s;\
108                 s/--enable and --with options recognized://m;                \
109                 s/\n  --with-x .*?(["\n])/$$1/s;                             \
110                 s/\n(Installation options:\n)/$$1/s;                         \
111                 s/\n(X Server Extension options:\n)/$$1/s;                   \
112                                                                              \
113                 s/^  --oldincludedir=.*$$/ \
114  --x-includes=DIR        X include files are in DIR\n \
115  --x-libraries=DIR       X library files are in DIR/m; \
116                                                                              \
117                 print;'                                                      \
118         < configure                                                          \
119         > $$TMP &&                                                           \
120         cat $$TMP > configure ) ;                                            \
121         rm -f $$TMP