ftp://ftp.zenez.com/pub/SCO/Skunk96/UnixWare/FreeBird/x11/utils/xscreensaver-1.18...
[xscreensaver] / Imakefile
1 /*
2  * Imakefile file for xscreensaver, Copyright (c) 1991-1993 Jamie Zawinski.
3  *
4  * You should not need to edit this file; edit config.h instead.
5  *
6  */
7
8 #include "config.h"
9
10        TARFILES = README Imakefile config.h screenblank.txt
11             TAR = gnutar
12        COMPRESS = compress
13    COMPRESS_EXT = Z
14 #      COMPRESS = gzip --verbose --best
15 #  COMPRESS_EXT = gz
16
17 all:: utils/Makefile driver/Makefile hacks/Makefile
18         cd utils  ; $(MAKE) $@ CC="$(CC)" CCOPTIONS="$(CCOPTIONS)" CDEBUGFLAGS="$(CDEBUGFLAGS)"
19         cd driver ; $(MAKE) $@ CC="$(CC)" CCOPTIONS="$(CCOPTIONS)" CDEBUGFLAGS="$(CDEBUGFLAGS)"
20         cd hacks  ; $(MAKE) $@ CC="$(CC)" CCOPTIONS="$(CCOPTIONS)" CDEBUGFLAGS="$(CDEBUGFLAGS)"
21
22 clean install install.man:: utils/Makefile driver/Makefile hacks/Makefile
23         cd utils  ; $(MAKE) $@
24         cd driver ; $(MAKE) $@
25         cd hacks  ; $(MAKE) $@
26
27 Makefiles:: utils/Makefile driver/Makefile hacks/Makefile
28
29 utils/Makefile: utils/Imakefile config.h
30         cd utils  ; $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)/utils
31 driver/Makefile: driver/Imakefile config.h
32         cd driver ; $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)/driver
33 hacks/Makefile: hacks/Imakefile config.h
34         cd hacks  ; $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)/hacks
35
36 # This really makes me sick...
37 tar: utils/Makefile driver/Makefile hacks/Makefile
38         @NAME=`sed -n                                                       \
39   's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/xscreensaver-\1/p' utils/version.h` ;  \
40   rm -f $$NAME ; ln -s . $$NAME ;                                           \
41   echo creating tar file $${NAME}.tar.$(COMPRESS_EXT)... ;                  \
42    $(TAR) -vchf - `echo $(TARFILES)                                         \
43    \`cd driver ; make echo_tarfiles | sed 's|^|driver/|g;s| | driver/|g'\`  \
44    \`cd utils  ; make echo_tarfiles | sed 's|^|utils/|g; s| | utils/|g'\`   \
45    \`cd hacks  ; make echo_tarfiles | sed 's|^|hacks/|g; s| | hacks/|g'\`   \
46    | sed "s|^|$$NAME/|g; s| | $$NAME/|g" `                                  \
47    | $(COMPRESS) > $${NAME}.tar.$(COMPRESS_EXT) ;                           \
48   rm $$NAME