ftp://ftp.ntnu.no/old/pub/X11/R5contrib/xscreensaver-1.17.tar.gz
[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
13 all:: utils/Makefile driver/Makefile hacks/Makefile
14         cd utils  ; $(MAKE) $@ CC="$(CC)" CCOPTIONS="$(CCOPTIONS)" CDEBUGFLAGS="$(CDEBUGFLAGS)"
15         cd driver ; $(MAKE) $@ CC="$(CC)" CCOPTIONS="$(CCOPTIONS)" CDEBUGFLAGS="$(CDEBUGFLAGS)"
16         cd hacks  ; $(MAKE) $@ CC="$(CC)" CCOPTIONS="$(CCOPTIONS)" CDEBUGFLAGS="$(CDEBUGFLAGS)"
17
18 clean install install.man:: utils/Makefile driver/Makefile hacks/Makefile
19         cd utils  ; $(MAKE) $@
20         cd driver ; $(MAKE) $@
21         cd hacks  ; $(MAKE) $@
22
23 Makefiles:: utils/Makefile driver/Makefile hacks/Makefile
24
25 utils/Makefile: utils/Imakefile config.h
26         cd utils  ; $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)/utils
27 driver/Makefile: driver/Imakefile config.h
28         cd driver ; $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)/driver
29 hacks/Makefile: hacks/Imakefile config.h
30         cd hacks  ; $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)/hacks
31
32 # This really makes me sick...
33 tar: utils/Makefile driver/Makefile hacks/Makefile
34         @NAME=`sed -n                                                       \
35   's/[^0-9]*\([0-9].[0-9]*\).*/xscreensaver-\1/p' utils/version.h` ;        \
36   rm -f $$NAME ; ln -s . $$NAME ;                                           \
37   echo creating tar file $${NAME}.tar.Z... ;                                \
38    $(TAR) -vchf - `echo $(TARFILES)                                         \
39    \`cd driver ; make echo_tarfiles | sed 's|^|driver/|g;s| | driver/|g'\`  \
40    \`cd utils  ; make echo_tarfiles | sed 's|^|utils/|g; s| | utils/|g'\`   \
41    \`cd hacks  ; make echo_tarfiles | sed 's|^|hacks/|g; s| | hacks/|g'\`   \
42    | sed "s|^|$$NAME/|g; s| | $$NAME/|g" `                                  \
43    | compress > $${NAME}.tar.Z ;                                            \
44   rm $$NAME