]> err.no Git - sope/blob - gnustep-make/GNUmakefile.in
added Kolab sample data
[sope] / gnustep-make / GNUmakefile.in
1 #   @configure_input@
2 #
3 #   Main GNUmakefile for the GNUstep GNUmakefile Package.
4 #
5 #   Copyright (C) 1997-2002 Free Software Foundation, Inc.
6 #
7 #   Author: Scott Christley <scottc@net-community.com>
8 #   Author: Nicola Pero <n.pero@mi.flashnet.it>
9 #
10 #   This file is part of the GNUstep Makefile Package.
11 #
12 #   This library is free software; you can redistribute it and/or
13 #   modify it under the terms of the GNU General Public License
14 #   as published by the Free Software Foundation; either version 2
15 #   of the License, or (at your option) any later version.
16 #   
17 #   You should have received a copy of the GNU General Public
18 #   License along with this library; see the file COPYING.LIB.
19 #   If not, write to the Free Software Foundation,
20 #   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
22 #
23 # I've thought about using the Makefile package files
24 # to install the GNUmakefile package, a cool little recursion,
25 # but there is nothing to made, and the files get installed
26 # in a special directory, so it was simpler this way.
27 #
28
29 include config.make
30
31 # To install everything inside a temporary directory (say as part of
32 # building a binary package - deb or rpm), use something like `make
33 # install special_prefix=/var/tmp/gnustep-make'
34 special_prefix = 
35
36 GNUSTEP_SYSTEM_ROOT = $(special_prefix)@prefix@
37 GNUSTEP_LOCAL_ROOT  = $(special_prefix)@GNUSTEP_LOCAL_ROOT@
38 GNUSTEP_NETWORK_ROOT = $(special_prefix)@GNUSTEP_NETWORK_ROOT@
39 srcdir = @srcdir@
40 VPATH = @srcdir@
41
42 GNUSTEP_FLATTENED = @GNUSTEP_FLATTENED@
43 GNUSTEP_TARGET_CPU = @clean_target_cpu@
44 GNUSTEP_TARGET_VENDOR = @clean_target_vendor@
45 GNUSTEP_TARGET_OS = @clean_target_os@
46
47 GNUSTEP_LIB_COMBO = @ac_cv_library_combo@
48
49 ifeq ($(GNUSTEP_FLATTENED),)
50   GNUSTEP_TARGET_DIR = $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)
51   GNUSTEP_TARGET_LDIR = $(GNUSTEP_TARGET_DIR)/$(GNUSTEP_LIB_COMBO)
52   MAYBE_LIBRARY_COMBO = $(GNUSTEP_LIB_COMBO)
53 else
54   GNUSTEP_TARGET_DIR = .
55   GNUSTEP_TARGET_LDIR = .
56   MAYBE_LIBRARY_COMBO = .
57 endif
58
59 export GNUSTEP_TARGET_DIR
60 export GNUSTEP_TARGET_LDIR
61 export MAYBE_LIBRARY_COMBO
62
63 makedir = $(GNUSTEP_SYSTEM_ROOT)/@MAKEFILES_SUFFIX@
64 tooldir = $(GNUSTEP_SYSTEM_ROOT)/Tools
65
66 INSTALL         = @INSTALL@
67 INSTALL_PROGRAM = @INSTALL_PROGRAM@
68 INSTALL_DATA    = @INSTALL_DATA@
69
70 VERTAG = $(subst .,_,$(GNUSTEP_MAKE_VERSION))
71
72 MAKE_FILES = aggregate.make application.make bundle.make service.make \
73         common.make library-combo.make java.make jni.make library.make \
74         messages.make rules.make target.make names.make resource-set.make \
75         tool.make ctool.make test-library.make \
76         objc.make test-application.make test-tool.make subproject.make \
77         palette.make gswapp.make gswbundle.make clibrary.make \
78         documentation.make \
79         java-executable.template java-tool.make framework.make \
80         native-library.make spec-rules.template spec-debug-rules.template \
81         spec-debug-alone-rules.template \
82         tar-exclude-list
83
84 MASTER_MAKE_FILES = \
85         aggregate.make source-distribution.make rpm.make rules.make \
86         application.make bundle.make clibrary.make ctool.make \
87         documentation.make framework.make gswapp.make gswbundle.make \
88         library.make objc.make java.make java-tool.make palette.make \
89         resource-set.make service.make subproject.make test-application.make \
90         test-library.make test-tool.make tool.make
91
92 INSTANCE_MAKE_FILES = \
93         rules.make \
94         application.make bundle.make clibrary.make ctool.make \
95         documentation.make framework.make gswapp.make gswbundle.make \
96         library.make objc.make java.make java-tool.make palette.make \
97         resource-set.make service.make subproject.make test-application.make \
98         test-library.make test-tool.make tool.make
99
100 INSTANCE_SHARED_MAKE_FILES = bundle.make headers.make java.make \
101                              stamp-string.make strings.make
102
103 INSTANCE_DOC_MAKE_FILES = autogsdoc.make gsdoc.make install_files.make \
104                           javadoc.make latex.make texi.make
105
106 all: generated-files which_lib$(EXEEXT) user_home$(EXEEXT)
107
108 # Please note that you should use a bit of care in the following rule,
109 # because it must work in a directory which is not the source
110 # directory - so for example $<, rather than which_lib.c, must be
111 # used. (I mean: 'cd core/make; cd ..; mkdir make-build; cd
112 # make-build; ../make/configure --disable-import; make;' must work)
113 which_lib$(EXEEXT): which_lib.c config.h
114         $(CC) @CFLAGS@ -Wall -I. -o $@ $<
115
116 user_home$(EXEEXT): user_home.c config.h
117         $(CC) @CFLAGS@ -DGNUSTEP_SYSTEM_ROOT=$(GNUSTEP_SYSTEM_ROOT) \
118               -Wall -I. -o $@ $<
119
120 ifeq ($(messages),yes)
121   EC = 
122 else
123   EC = @
124 endif
125
126 move_obsolete:
127         $(EC)(echo "Moving paths from old heirarchy: "; \
128          $(srcdir)/move_obsolete_paths.sh $(GNUSTEP_SYSTEM_ROOT) $(GNUSTEP_LOCAL_ROOT) $(GNUSTEP_USER_ROOT))
129
130 install: all @GNUSTEP_MOVE_OBSOLETE@
131         $(EC)(echo "Creating system domain: $(GNUSTEP_SYSTEM_ROOT)"; \
132          $(srcdir)/create_domain_dir_tree.sh $(GNUSTEP_SYSTEM_ROOT); \
133          echo "Creating local and network dirs: $(GNUSTEP_LOCAL_ROOT), $(GNUSTEP_NETWORK_ROOT)"; \
134         $(srcdir)/mkinstalldirs $(GNUSTEP_LOCAL_ROOT) $(GNUSTEP_NETWORK_ROOT);\
135          echo "Creating makefile directories in: $(makedir)"; \
136          $(srcdir)/mkinstalldirs \
137                 $(makedir) \
138                 $(makedir)/$(GNUSTEP_TARGET_CPU) \
139                 $(makedir)/$(GNUSTEP_TARGET_DIR) \
140                 $(makedir)/Additional \
141                 $(makedir)/Auxiliary \
142                 $(makedir)/Master \
143                 $(makedir)/Instance \
144                 $(makedir)/Instance/Shared \
145                 $(makedir)/Instance/Documentation)
146         -$(EC) rm -f $(GNUSTEP_SYSTEM_ROOT)/Makefiles
147 ifeq ($(HAS_LN_S), yes)
148         $(EC) (cd $(GNUSTEP_SYSTEM_ROOT); $(LN_S) @MAKEFILES_SUFFIX@ Makefiles)
149 endif
150          $(EC)(echo "Installing gnustep-make support software"; \
151            $(INSTALL_PROGRAM) -m 755 which_lib$(EXEEXT) \
152              $(makedir)/$(GNUSTEP_TARGET_DIR); \
153            $(INSTALL_PROGRAM) -m 755 user_home$(EXEEXT) \
154              $(makedir)/$(GNUSTEP_TARGET_DIR))
155          $(EC)(for f in config.guess config.sub install-sh mkinstalldirs \
156                 clean_cpu.sh clean_os.sh \
157                 clean_vendor.sh cpu.sh GNUstep-reset.sh \
158                 ld_lib_path.sh os.sh transform_paths.sh vendor.sh \
159                 ld_lib_path.csh relative_path.sh strip_makefiles.sh; do \
160              $(INSTALL_PROGRAM) -m 755 $(srcdir)/$$f $(makedir); \
161            done)
162         $(EC)($(INSTALL_PROGRAM) -m 755 GNUstep.sh $(makedir); \
163           $(INSTALL_PROGRAM) -m 755 GNUstep.csh $(makedir); \
164           $(INSTALL_PROGRAM) -m 755 fixpath.sh $(makedir); \
165           $(INSTALL_PROGRAM) -m 755 openapp $(tooldir); \
166           $(INSTALL_PROGRAM) -m 755 debugapp $(tooldir); \
167           $(INSTALL_PROGRAM) -m 755 opentool $(tooldir))
168          $(EC)(echo "Installing makefiles"; \
169            for f in $(MAKE_FILES); do \
170              $(INSTALL_DATA) $(srcdir)/$$f $(makedir); \
171            done; \
172            for f in $(MASTER_MAKE_FILES); do \
173              $(INSTALL_DATA) $(srcdir)/Master/$$f $(makedir)/Master; \
174            done; \
175            for f in $(INSTANCE_MAKE_FILES); do \
176              $(INSTALL_DATA) $(srcdir)/Instance/$$f $(makedir)/Instance; \
177            done; \
178            for f in $(INSTANCE_SHARED_MAKE_FILES); do \
179              $(INSTALL_DATA) $(srcdir)/Instance/Shared/$$f \
180                              $(makedir)/Instance/Shared; \
181            done; \
182            for f in $(INSTANCE_DOC_MAKE_FILES); do \
183              $(INSTALL_DATA) $(srcdir)/Instance/Documentation/$$f \
184                              $(makedir)/Instance/Documentation; \
185            done; \
186            $(INSTALL_DATA) executable.template $(makedir); \
187            $(INSTALL_DATA) config.make $(makedir)/$(GNUSTEP_TARGET_DIR))
188          $(EC)($(srcdir)/mkinstalldirs $(GNUSTEP_SYSTEM_ROOT)/share; \
189            $(INSTALL_DATA) $(srcdir)/config.site $(GNUSTEP_SYSTEM_ROOT)/share)
190          $(EC)(echo "Installing system GNUsteprc"; \
191            $(INSTALL_DATA) GNUsteprc $(GNUSTEP_SYSTEM_ROOT)/.GNUsteprc)
192         $(EC)(if [ "@GNUSTEP_STRIP_MAKEFILES@" = "strip" ]; then \
193            echo "Stripping makefiles and shell scripts..."; \
194            cd $(makedir); ./strip_makefiles.sh; \
195            fi)
196
197 #
198 # NICOLA - Need to clean the following message and print it at the end
199 # of the install rule
200 #
201 #       @echo ""
202 #       @echo "IMPORTANT: you need to execute a shell initialization script"
203 #       @echo "before you can use gnustep-make.  The command to run the shell"
204 #       @echo "initialization script is:"
205 #       @echo ". $(makedir)/GNUstep.sh"
206 #       @echo "(be careful to put the space after the dot)"
207 #       @echo "Please run it now."
208 #       @echo ""
209
210 uninstall:
211         rm -f $(makedir)/$(GNUSTEP_TARGET_DIR)/which_lib$(EXEEXT)
212         rm -f $(makedir)/$(GNUSTEP_TARGET_DIR)/user_home$(EXEEXT)
213         for f in config.guess config.sub install-sh mkinstalldirs \
214                 clean_cpu.sh clean_os.sh \
215                 clean_vendor.sh cpu.sh ld_lib_path.sh os.sh \
216                 transform_paths.sh vendor.sh \
217                 ld_lib_path.csh fixpath.sh \
218                 GNUstep.sh GNUstep.csh GNUstep-reset.sh \
219                 relative_path.sh strip_makefiles.sh; do \
220           rm -f $(makedir)/$$f; \
221         done
222         rm -f $(tooldir)/openapp; \
223         rm -f $(tooldir)/debugapp; \
224         rm -f $(tooldir)/opentool; \
225         for f in $(MAKE_FILES); do \
226           rm -f $(makedir)/$$f; \
227         done
228         for f in $(MASTER_MAKE_FILES); do \
229           rm -f $(makedir)/Master/$$f; \
230         done
231         for f in $(INSTANCE_MAKE_FILES); do \
232           rm -f $(makedir)/Instance/$$f; \
233         done
234         for f in $(INSTANCE_SHARED_MAKE_FILES); do \
235           rm -f $(makedir)/Instance/Shared/$$f; \
236         done
237         for f in $(INSTANCE_DOC_MAKE_FILES); do \
238           rm -f $(makedir)/Instance/Documentation/$$f; \
239         done
240         rm -f $(makedir)/executable.template
241         rm -f $(GNUSTEP_SYSTEM_ROOT)/share/config.site
242         rm -f $(makedir)/$(GNUSTEP_TARGET_DIR)/config.make
243         rm -f $(GNUSTEP_SYSTEM_ROOT)/.GNUsteprc
244         -for f in $(makedir)/$(GNUSTEP_TARGET_CPU) \
245                 $(makedir)/$(GNUSTEP_TARGET_DIR) \
246                 $(makedir)/Additional \
247                 $(makedir)/Auxiliary \
248                 $(makedir)/Master \
249                 $(makedir)/Instance/Shared \
250                 $(makedir)/Instance/Documentation \
251                 $(makedir)/Instance; do \
252           rmdir $$f; \
253         done
254 # To really uninstall all of GNUstep, a 'rm -Rf ${GNUSTEP_ROOT}' should do.
255
256 clean:
257         rm -f *~ which_lib$(EXEEXT) user_home$(EXEEXT) \
258           Master/*~ Instance/*~ Instance/Shared/*~
259
260 distclean: clean
261         rm -f GNUmakefile config.make config.h
262         rm -f config.cache config.log config.status
263         rm -f openapp
264         rm -f debugapp
265         rm -f opentool
266         rm -f executable.template
267         rm -f GNUstep.sh
268         rm -f GNUstep.csh
269         rm -f fixpath.sh
270         rm -f gnustep-make.spec
271         rm -f GNUsteprc
272
273 cvs-tag:
274         cvs -z3 rtag make-$(VERTAG) make
275
276 cvs-dist:
277         cvs -z3 export -r make-$(VERTAG) make
278         mv make gnustep-make-$(GNUSTEP_MAKE_VERSION)
279         tar --gzip -cf gnustep-make-$(GNUSTEP_MAKE_VERSION).tar.gz gnustep-make-$(GNUSTEP_MAKE_VERSION)
280         rm -rf gnustep-make-$(GNUSTEP_MAKE_VERSION)
281
282 cvs-snapshot:
283         cvs -z3 export -D now make
284         mv make gnustep-make-$(GNUSTEP_MAKE_VERSION)
285         tar --gzip -cf gnustep-make-$(GNUSTEP_MAKE_VERSION).tar.gz gnustep-make-$(GNUSTEP_MAKE_VERSION)
286         rm -rf gnustep-make-$(GNUSTEP_MAKE_VERSION)
287
288 test-RPM_TOPDIR:
289         @(if [ -z "$(RPM_TOPDIR)" ]; then                                  \
290           echo "Error - RPM_TOPDIR variable not set.";                     \
291           echo "You need to set it to the top of your rpm directory tree"; \
292           exit 1;                                                          \
293         fi)
294
295 # The check for rpmbuild is for old RPM versions which didn't have
296 # rpmbuild and used 'rpm -ba' instead.  It can be removed when we are
297 # reasonably sure no more old RPM versions (not having rpmbuild), are
298 # still around.
299 rpm: test-RPM_TOPDIR dist
300         cp ../gnustep-make-$(GNUSTEP_MAKE_VERSION).tar.gz $(RPM_TOPDIR)/SOURCES/
301         cp gnustep-make.spec $(RPM_TOPDIR)/SPECS/
302         cd $(RPM_TOPDIR)/SPECS/
303         if which rpmbuild > /dev/null 2>/dev/null; then \
304           rpmbuild="rpmbuild"; \
305         else \
306           if which rpm > /dev/null 2>/dev/null; then \
307             rpmbuild="rpm"; \
308           else \
309             echo "Error: You don't have rpm installed!"; \
310             rpmbuild="rpmbuild"; \
311           fi; \
312         fi; \
313         $${rpmbuild} -ba gnustep-make.spec
314
315 generated-files: GNUmakefile GNUstep.sh GNUstep.csh fixpath.sh config.h config.make debugapp openapp opentool gnustep-make.spec executable.template
316
317 GNUmakefile: GNUmakefile.in config.status
318         $(SHELL) config.status
319
320 GNUstep.sh: GNUstep.sh.in
321         $(SHELL) config.status
322
323 GNUstep.csh: GNUstep.csh.in
324         $(SHELL) config.status
325
326 fixpath.sh: fixpath.sh.in
327         $(SHELL) config.status
328
329 config.h: config.h.in
330         $(SHELL) config.status
331
332 config.make: config.make.in Version
333         $(SHELL) config.status --recheck
334
335 debugapp: debugapp.in
336         $(SHELL) config.status
337
338 openapp: openapp.in
339         $(SHELL) config.status
340
341 opentool: opentool.in
342         $(SHELL) config.status
343
344 gnustep-make.spec: gnustep-make.spec.in Version
345         $(SHELL) config.status --recheck
346
347 executable.template: executable.template.in
348         $(SHELL) config.status