All of SXEmacs' http URLs are now https. WooHoo!
[sxemacs] / Makefile.am
1 ## SXEmacs toplevel Makefile.am
2
3 ## Copyright (C) 2007 Steve Youngs
4
5 ## This file is part of SXEmacs.
6
7 ## SXEmacs is free software: you can redistribute it and/or modify
8 ## it under the terms of the GNU General Public License as published by
9 ## the Free Software Foundation, either version 3 of the License, or
10 ## (at your option) any later version.
11
12 ## SXEmacs is distributed in the hope that it will be useful,
13 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 ## GNU General Public License for more details.
16
17 ## You should have received a copy of the GNU General Public License
18 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
20 ## Process this file with automake to produce Makefile.in
21
22 # Help the Developers and yourself. Just use the C locale and settings
23 # for the compilation. They can still be overriden by make LANG=<whatever>
24 # but that is general a not very good idea
25 LANG=C
26 LC_ALL=C
27
28 ACLOCAL_AMFLAGS = -I m4
29
30 builddir = @builddir@
31 srcdir = @srcdir@
32 top_builddir = .
33 top_build_prefix = $(top_builddir)/
34 top_srcdir = @top_srcdir@
35 abs_top_builddir = @abs_top_builddir@
36 abs_top_srcdir = @abs_top_srcdir@
37
38 archlibdir = ${libdir}/${instvardir}/${configuration}
39 etcdir = ${datadir}/${instvardir}/etc
40
41 ETAGS = $(top_builddir)/lib-src/etags
42 TAGS_DEPENDENCIES = $(ETAGS)
43
44 EXTRA_DIST = autogen.sh sxemacs_version.m4
45 EXTRA_DIST += configfsf.guess configfsf.sub
46
47 REPORT_VARS=PATH LD_LIBRARY_PATH LIBRARY_PATH SHLIB_PATH DYLD_LIBRARY_PATH CC CPATH CPPFLAGS CFLAGS LDFLAGS INCLUDE_PATH C_INCLUDE_PATH SHELL GCC_EXEC_PREFIX COMPILER_PATH DEPENDENCIES_OUTPUT GNUTARGET LDEMULATION
48
49 ## we do not use automake's SUBDIRS thingie
50 sxe_subdirs =
51 if DESCEND_LIBLTDL
52 sxe_subdirs += libltdl
53 endif
54 sxe_subdirs += lib-src
55 if DESCEND_MODULES
56 sxe_subdirs += modules
57 endif
58 ## Note that src and lisp are traversed twice on purpose
59 ## for use of the proper dumped emacs for the autoloads and tests
60 sxe_subdirs += src lisp src lisp info etc tests
61
62 SUBDIRS =
63 SUBDIRS += $(sxe_subdirs)
64
65 m4datadir = $(datadir)/aclocal
66 dist_m4data_DATA = m4/sxemacs.m4 m4/sxe-pkgconfig.m4
67 dist_etc_DATA = PROBLEMS
68
69 pcdir = ${libdir}/pkgconfig
70 pc_DATA = sxemacs.pc
71
72 CLEANFILES = stage1 stage2 ,,build.done
73
74 ## custom rules
75 MV = mv
76 TOUCH = touch
77
78 RECURSE =                                                               \
79         @for subdir in $(sxe_subdirs); do                               \
80                 test "$$subdir" = . ||                                  \
81                         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@);    \
82         done ;                                                          \
83         @$(TOUCH) $@
84
85 CROSSMAKE = (cd `dirname $@` && $(MAKE) $(AM_MAKEFLAGS) `basename $@`)
86
87 if DESCEND_MODULES
88 module_DATA = modules/auto-autoloads.el modules/auto-autoloads.elc
89
90 modules/auto-autoloads.el \
91 modules/auto-autoloads.elc: $(EMACS)
92         $(CROSSMAKE)
93 endif
94
95 SXE_SHOW_DUMP = $(DESTDIR)$(bindir)/sxemacs -sd)
96
97 install-exec-hook:
98         mv -f $(DESTDIR)$(bindir)/sxemacs $(DESTDIR)$(bindir)/sxemacs-$(old_version)
99         (cd $(DESTDIR)$(bindir) && $(LN_S) sxemacs-$(old_version) sxemacs)
100
101 uninstall-hook:
102         cd $(DESTDIR)$(bindir) && \
103         $(RM) sxemacs-$(old_version)
104
105 check-recursive: all-recursive
106
107 distclean-local:
108         $(RM) $(builddir)/Installation
109         $(RM) $(builddir)/cpuid
110
111 $(ETAGS):
112         cd $(top_builddir)/lib-src
113         $(MAKE) $(AM_MAKEFLAGS) etags
114
115 .PHONY: stage1 stage2 build-report time-build-report time-check beta
116 ## Convenience target for SXEmacs beta testers
117 beta:
118         $(MAKE) $(AM_MAKEFLAGS) clean
119         $(MAKE) $(AM_MAKEFLAGS) all
120         @ touch ,,build.done
121
122 ## Convenience target for SXEmacs build reporters
123 env-report:
124         @(echo "Environment Variables" ;\
125           echo "---------------------"  ) | tee ,,vars.out
126         @(echo "${REPORT_VARS}" | \
127                 ${AWK} '{ for(f=1;f<=NF;f++) if( ENVIRON[$$f] ) \
128                         { print $$f "=" ENVIRON[$$f] } }') \
129                 | tee -a ,,vars.out
130         @(echo "Make Variables" ; \
131         echo "--------------" ; \
132         echo MAKE="${MAKE}" ; \
133         echo MAKEFILES="${MAKEFILES}" ; \
134         echo MAKEFLAGS="${MAKEFLAGS}" ; \
135         echo AM_MAKEFLAGS="${AM_MAKEFLAGS}" ;  \
136         echo RECURSIVE_MAKE_ARGS="${RECURSIVE_MAKE_ARGS}"  ) | tee -a ,,vars.out
137
138 time-beta:
139         (time $(MAKE) $(AM_MAKEFLAGS) beta )2>&1 | tee ,,beta.out
140
141 time-all:
142         time $(MAKE) $(AM_MAKEFLAGS) all
143
144 time-check:
145         (time $(MAKE) $(AM_MAKEFLAGS) check ) 2>&1 | tee ,,make-check.out
146
147 build-report: env-report
148         $(MAKE) $(AM_MAKEFLAGS) beta 2>&1 | tee ,,beta.out
149         @ [ -f ,,build.done ] || exit 1
150         $(MAKE) -w $(MAKEFLAGS) check 2>&1 | tee ,,make-check.out
151
152 time-build-report: env-report
153         $(MAKE) $(AM_MAKEFLAGS) time-beta
154         @ [ -f ,,build.done ] || exit 1
155         $(MAKE) $(AM_MAKEFLAGS) time-check 
156
157 stage1:
158         @echo
159         @echo "$@ in progress ..."
160         @$(RECURSE)
161         @echo "$@ finished"
162
163 stage2: stage1
164         @echo
165         @echo "$@ in progress ..."
166         @$(RECURSE)
167         @echo "$@ finished"
168
169 ### dont use staged build
170 ##all: stage1 stage2
171