2 # Makefile for top level of zsh distribution
4 # Copyright (c) 1995-1997 Richard Coleman
7 # Permission is hereby granted, without written agreement and without
8 # license or royalty fees, to use, copy, modify, and distribute this
9 # software and to distribute modified versions of this software for any
10 # purpose, provided that the above copyright notice and the following
11 # two paragraphs appear in all copies of this software.
13 # In no event shall Richard Coleman or the Zsh Development Group be liable
14 # to any party for direct, indirect, special, incidental, or consequential
15 # damages arising out of the use of this software and its documentation,
16 # even if Richard Coleman and the Zsh Development Group have been advised of
17 # the possibility of such damage.
19 # Richard Coleman and the Zsh Development Group specifically disclaim any
20 # warranties, including, but not limited to, the implied warranties of
21 # merchantability and fitness for a particular purpose. The software
22 # provided hereunder is on an "as is" basis, and Richard Coleman and the
23 # Zsh Development Group have no obligation to provide maintenance,
24 # support, updates, enhancements, or modifications.
29 SUBDIRS
= Doc Etc Src Test
33 # source/build directories
36 sdir_top
= @top_srcdir@
41 # ========== DEPENDENCIES FOR BUILDING ==========
44 all: config.h config.modules
45 @for subdir in Src Doc
; do \
46 (cd
$$subdir && $(MAKE
) $(MAKEDEFS
) $@
) || exit
1; \
49 # prepare module configuration
51 @cd Src
&& $(MAKE
) $(MAKEDEFS
) $@
54 @cd Doc
&& $(MAKE
) $(MAKEDEFS
) ..
/META-FAQ
57 @cd Doc
&& $(MAKE
) $(MAKEDEFS
) $@
59 # ========== DEPENDENCIES FOR INSTALLING ==========
63 $(MAKE
) install STRIPFLAGS
="-s"
65 # install/uninstall most things
66 install: install.bin
install.modules
install.fns
install.man
67 uninstall: uninstall.bin
uninstall.modules
uninstall.fns
uninstall.man
69 # install/uninstall just the binary
70 install.bin
uninstall.bin
:
71 @cd Src
&& $(MAKE
) $(MAKEDEFS
) $@
73 # install/uninstall just the modules
74 install.modules
uninstall.modules
:
75 @cd Src
&& $(MAKE
) $(MAKEDEFS
) $@
77 # install/uninstall just the man pages
78 install.man
uninstall.man
:
79 @cd Doc
&& $(MAKE
) $(MAKEDEFS
) $@
81 # install/uninstall just the shell functions
83 if
test x
$(fndir
) != x
&& test x
$(fndir
) != xno
; then \
84 test x
$(sitefndir
) != xno
&& \
85 $(SHELL
) $(sdir_top
)/mkinstalldirs
$(DESTDIR
)$(sitefndir
); \
86 sdir_top
="$(sdir_top)" fndir
="$(fndir)" dir_top
="$(dir_top)" \
87 scriptdir
="$(scriptdir)" \
88 FUNCTIONS_SUBDIRS
="$(FUNCTIONS_SUBDIRS)" \
89 INSTALL_DATA
="$(INSTALL_DATA)" \
90 INSTALL_PROGRAM
="$(INSTALL_PROGRAM)" \
91 DESTDIR
="$(DESTDIR)" VERSION
="$(VERSION)" \
92 $(SHELL
) $(sdir_top
)/Config
/installfns.sh || exit
1; \
97 if
test x
$(fndir
) != x
&& test x
$(fndir
) != xno
; then \
98 fndir
="$(fndir)" dir_top
="$(dir_top)" \
99 scriptdir
="$(scriptdir)" \
100 FUNCTIONS_SUBDIRS
="$(FUNCTIONS_SUBDIRS)" \
101 DESTDIR
="$(DESTDIR)" VERSION
="$(VERSION)" \
102 $(SHELL
) $(sdir_top
)/Config
/uninstallfns.sh || exit
1; \
106 # install/uninstall just the info pages
107 install.
info uninstall.
info:
108 @cd Doc
&& $(MAKE
) $(MAKEDEFS
) $@
110 # install/uninstall just the HTML manual
111 install.html
uninstall.html
:
112 @cd Doc
&& $(MAKE
) $(MAKEDEFS
) $@
114 # ========== DEPENDENCIES FOR TESTING ==========
116 cd Test
; $(MAKE
) check
118 # ========== DEPENDENCIES FOR CLEANUP ==========
123 rm -f Makefile config.h config.status config.log config.cache config.modules config.modules.sh stamp-h Config
/defs.mk
124 rm -rf autom4te.cache
127 cd
$(sdir
) && rm -f config.h.in stamp-h.in configure
129 # ========== DEPENDENCIES FOR MAINTENANCE ==========
135 config.status
: $(sdir
)/configure
136 $(SHELL
) .
/config.status
--recheck
138 $(sdir
)/configure
: $(sdir
)/aclocal.m4
$(sdir
)/aczsh.m4
$(sdir
)/configure.ac
139 cd
$(sdir
) && autoconf
142 stamp-h
: $(sdir
)/config.h.in config.status
143 cd
$(dir_top
) && $(SHELL
) .
/config.status config.h
$@
145 config.modules
: $(sdir
)/config.h.in config.status config.modules.sh
146 cd
$(dir_top
) && $(SHELL
) .
/config.status
$@
&& \
147 $(SHELL
) .
/config.modules.sh
149 $(sdir
)/config.h.in
: $(sdir
)/stamp-h.in
150 $(sdir
)/stamp-h.in
: $(sdir
)/configure.ac \
151 $(sdir
)/aclocal.m4
$(sdir
)/aczsh.m4
152 cd
$(sdir
) && autoheader
153 echo
> $(sdir
)/stamp-h.in
155 # ========== DEPENDENCIES FOR DISTRIBUTION ==========
157 DISTNAME
= zsh-
$(VERSION
)
159 targz-src
: $(DISTNAME
).
tar.gz
160 $(DISTNAME
).
tar.gz
: FORCE
161 @
$(sdir_top
)/Util
/mkdisttree.sh
$(DISTNAME
) $(sdir_top
) $(dir_top
) SRC \
163 tar cf
- $(DISTNAME
) | gzip
-9 > $@
166 targz-doc
: $(DISTNAME
)-doc.
tar.gz
167 $(DISTNAME
)-doc.
tar.gz
: FORCE
168 @
$(sdir_top
)/Util
/mkdisttree.sh
$(DISTNAME
) $(sdir_top
) $(dir_top
) DOC \
170 tar cf
- $(DISTNAME
) | gzip
-9 > $@