1 ## SXEmacs toplevel Makefile.am
3 ## Copyright (C) 2007 Steve Youngs
5 ## This file is part of SXEmacs.
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.
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.
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/>.
20 ## Process this file with automake to produce Makefile.in
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
28 ACLOCAL_AMFLAGS = -I m4
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@
38 archlibdir = ${libdir}/${instvardir}/${configuration}
39 etcdir = ${datadir}/${instvardir}/etc
41 ETAGS = $(top_builddir)/lib-src/etags
42 TAGS_DEPENDENCIES = $(ETAGS)
44 EXTRA_DIST = autogen.sh sxemacs_version.m4
45 EXTRA_DIST += configfsf.guess configfsf.sub
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
49 ## we do not use automake's SUBDIRS thingie
52 sxe_subdirs += libltdl
54 sxe_subdirs += lib-src
56 sxe_subdirs += modules
58 sxe_subdirs += src lisp src lisp info etc tests
61 SUBDIRS += $(sxe_subdirs)
63 m4datadir = $(datadir)/aclocal
64 dist_m4data_DATA = m4/sxemacs.m4 m4/sxe-pkgconfig.m4
65 dist_etc_DATA = PROBLEMS
67 pcdir = ${libdir}/pkgconfig
70 CLEANFILES = stage1 stage2 ,,build.done
77 @for subdir in $(sxe_subdirs); do \
78 test "$$subdir" = . || \
79 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@); \
83 CROSSMAKE = (cd `dirname $@` && $(MAKE) $(AM_MAKEFLAGS) `basename $@`)
86 module_DATA = modules/auto-autoloads.el modules/auto-autoloads.elc
88 modules/auto-autoloads.el \
89 modules/auto-autoloads.elc: $(EMACS)
93 SXE_SHOW_DUMP = $(DESTDIR)$(bindir)/sxemacs -sd)
96 mv -f $(DESTDIR)$(bindir)/sxemacs $(DESTDIR)$(bindir)/sxemacs-$(old_version)
97 (cd $(DESTDIR)$(bindir) && $(LN_S) sxemacs-$(old_version) sxemacs)
100 cd $(DESTDIR)$(bindir) && \
101 $(RM) sxemacs-$(old_version)
103 check-recursive: all-recursive
106 $(RM) $(builddir)/Installation
107 $(RM) $(builddir)/cpuid
110 cd $(top_builddir)/lib-src
111 $(MAKE) $(AM_MAKEFLAGS) etags
113 .PHONY: stage1 stage2 build-report time-build-report time-check beta
114 ## Convenience target for SXEmacs beta testers
116 $(MAKE) $(RECURSIVE_MAKE_ARGS) clean
117 $(MAKE) $(RECURSIVE_MAKE_ARGS) all
120 ## Convenience target for SXEmacs build reporters
122 @(echo "Environment Variables" ;\
123 echo "---------------------" ) | tee ,,vars.out
124 @(echo "${REPORT_VARS}" | \
125 ${AWK} '{ for(f=1;f<=NF;f++) if( ENVIRON[$$f] ) \
126 { print $$f "=" ENVIRON[$$f] } }') \
128 @(echo "Make Variables" ; \
129 echo "--------------" ; \
130 echo MAKE="${MAKE}" ; \
131 echo MAKEFILES="${MAKEFILES}" ; \
132 echo MAKEFLAGS="${MAKEFLAGS}" ; \
133 echo AM_MAKEFLAGS="${AM_MAKEFLAGS}" ; \
134 echo RECURSIVE_MAKE_ARGS="${RECURSIVE_MAKE_ARGS}" ) | tee -a ,,vars.out
137 (time $(MAKE) $(RECURSIVE_MAKE_ARGS) beta )2>&1 | tee ,,beta.out
140 time $(MAKE) $(RECURSIVE_MAKE_ARGS) all
143 (time $(MAKE) $(RECURSIVE_MAKE_ARGS) check ) 2>&1 | tee ,,make-check.out
145 build-report: env-report
146 $(MAKE) $(RECURSIVE_MAKE_ARGS) beta 2>&1 | tee ,,beta.out
147 @ [ -f ,,build.done ] || exit 1
148 $(MAKE) $(RECURSIVE_MAKE_ARGS) check 2>&1 | tee ,,make-check.out
150 time-build-report: env-report
151 (time $(MAKE) $(RECURSIVE_MAKE_ARGS) beta ) 2>&1 | tee ,,beta.out
152 @ [ -f ,,build.done ] || exit 1
153 (time $(MAKE) $(RECURSIVE_MAKE_ARGS) check ) 2>&1 | tee ,,make-check.out
157 @echo "$@ in progress ..."
163 @echo "$@ in progress ..."
167 ### dont use staged build