comparison Makefile.in @ 112302:c428fb33aede

Automate syncing from gnulib.
author Paul Eggert <eggert@cs.ucla.edu>
date Sat, 08 Jan 2011 13:02:38 -0800
parents 5e63c33ad48c
children 9539682ee916
comparison
equal deleted inserted replaced
112164:afa244de82cd 112302:c428fb33aede
262 # leim is not included because it needs special handling. 262 # leim is not included because it needs special handling.
263 # 263 #
264 # Actually, we now include `lisp' as well, since the compiled files 264 # Actually, we now include `lisp' as well, since the compiled files
265 # are not included any more in case of bootstrap or in case Emacs was 265 # are not included any more in case of bootstrap or in case Emacs was
266 # checked out from a VCS. 266 # checked out from a VCS.
267 SUBDIR = lib-src src lisp 267 SUBDIR = lib lib-src src lisp
268 268
269 # The subdir makefiles created by config.status. 269 # The subdir makefiles created by config.status.
270 SUBDIR_MAKEFILES = lib-src/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispref/Makefile doc/lispintro/Makefile src/Makefile oldXMenu/Makefile lwlib/Makefile leim/Makefile lisp/Makefile 270 SUBDIR_MAKEFILES = lib/Makefile lib-src/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispref/Makefile doc/lispintro/Makefile src/Makefile oldXMenu/Makefile lwlib/Makefile leim/Makefile lisp/Makefile
271 271
272 # Subdirectories to install, and where they'll go. 272 # Subdirectories to install, and where they'll go.
273 # lib-src's makefile knows how to install it, so we don't do that here. 273 # lib-src's makefile knows how to install it, so we don't do that here.
274 # leim's makefile also knows how to install it, so we don't do that here. 274 # leim's makefile also knows how to install it, so we don't do that here.
275 # When installing the info files, we need to do special things to 275 # When installing the info files, we need to do special things to
311 leim: src Makefile FRC 311 leim: src Makefile FRC
312 (export PARALLEL; PARALLEL=0; cd $@; $(MAKE) all $(MFLAGS) \ 312 (export PARALLEL; PARALLEL=0; cd $@; $(MAKE) all $(MFLAGS) \
313 CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ 313 CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
314 LDFLAGS='${LDFLAGS}' MAKE='${MAKE}') 314 LDFLAGS='${LDFLAGS}' MAKE='${MAKE}')
315 315
316 lib-src src: lib
317
316 src: lib-src FRC 318 src: lib-src FRC
317 319
318 .RECURSIVE: ${SUBDIR} leim 320 .RECURSIVE: ${SUBDIR} leim
319 321
320 # We need to build `emacs' in `src' to compile the *.elc files in `lisp'. 322 # We need to build `emacs' in `src' to compile the *.elc files in `lisp'.
321 lisp: src 323 lisp: src
322 324
325 # Maintainers can put a copy of gnulib into $(gnulib_srcdir).
326 gnulib_srcdir = ../gnulib
327 $(gnulib_srcdir):
328 git clone git://git.savannah.gnu.org/gnulib.git $@
329
330 # Update modules from gnulib, for maintainers, who should have it in
331 # $(gnulib_srcdir) (relative to $(srcdir) and should have build tools
332 # as per $(gnulib_srcdir)/DEPENDENCIES.
333 GNULIB_MODULES = dummy # Just a dummy for now, to establish the mechanism.
334 GNULIB_TOOL_FLAGS = \
335 --import --no-changelog --no-vc-files --makefile-name=gnulib.mk
336 sync-from-gnulib: $(gnulib_srcdir)
337 cd $(srcdir) && \
338 $(gnulib_srcdir)/gnulib-tool $(GNULIB_TOOL_FLAGS) $(GNULIB_MODULES)
339 cp $(gnulib_srcdir)/build-aux/texinfo.tex $(srcdir)/doc/misc
340 cp \
341 $(gnulib_srcdir)/build-aux/config.sub \
342 $(gnulib_srcdir)/build-aux/config.guess \
343 $(gnulib_srcdir)/build-aux/install-sh \
344 $(gnulib_srcdir)/build-aux/mkinstalldirs \
345 $(gnulib_srcdir)/build-aux/move-if-change \
346 $(srcdir)
347 .PHONY: sync-from-gnulib
348
323 # These targets should be "${SUBDIR} without `src'". 349 # These targets should be "${SUBDIR} without `src'".
324 lib-src lisp: Makefile FRC 350 lib lib-src lisp: Makefile FRC
325 cd $@; $(MAKE) all $(MFLAGS) \ 351 cd $@; $(MAKE) all $(MFLAGS) \
326 CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ 352 CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
327 LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' 353 LDFLAGS='${LDFLAGS}' MAKE='${MAKE}'
328 354
329 # Pass to src/Makefile.in an additional BOOTSTRAPEMACS variable which 355 # Pass to src/Makefile.in an additional BOOTSTRAPEMACS variable which
358 # conditions with parallel makes, so let's assume that the time stamp on 384 # conditions with parallel makes, so let's assume that the time stamp on
359 # ./Makefile is representative of the time stamp on all the other Makefiles. 385 # ./Makefile is representative of the time stamp on all the other Makefiles.
360 Makefile: config.status $(srcdir)/src/config.in \ 386 Makefile: config.status $(srcdir)/src/config.in \
361 $(srcdir)/Makefile.in \ 387 $(srcdir)/Makefile.in \
362 $(srcdir)/src/Makefile.in \ 388 $(srcdir)/src/Makefile.in \
389 $(srcdir)/lib/Makefile.in \
363 $(srcdir)/lib-src/Makefile.in \ 390 $(srcdir)/lib-src/Makefile.in \
364 $(srcdir)/doc/emacs/Makefile.in \ 391 $(srcdir)/doc/emacs/Makefile.in \
365 $(srcdir)/doc/misc/Makefile.in \ 392 $(srcdir)/doc/misc/Makefile.in \
366 $(srcdir)/doc/lispref/Makefile.in \ 393 $(srcdir)/doc/lispref/Makefile.in \
367 $(srcdir)/doc/lispintro/Makefile.in \ 394 $(srcdir)/doc/lispintro/Makefile.in \
372 ./config.status 399 ./config.status
373 400
374 config.status: ${srcdir}/configure ${srcdir}/lisp/version.el 401 config.status: ${srcdir}/configure ${srcdir}/lisp/version.el
375 ./config.status --recheck 402 ./config.status --recheck
376 403
377 AUTOCONF_INPUTS = @MAINT@ $(srcdir)/configure.in $(srcdir)/m4/getopt.m4 404 AUTOCONF_INPUTS = @MAINT@ $(srcdir)/configure.in $(srcdir)/m4/getopt.m4 $(srcdir)/aclocal.m4
378 405
379 $(srcdir)/configure: $(AUTOCONF_INPUTS) 406 $(srcdir)/configure: $(AUTOCONF_INPUTS)
380 cd ${srcdir} && autoconf 407 cd ${srcdir} && autoconf
408
409 ACLOCAL_INPUTS = @MAINT@ $(srcdir)/m4/gnulib-comp.m4
410 $(srcdir)/aclocal.m4: $(ACLOCAL_INPUTS)
411 cd $(srcdir) && aclocal -I m4
412
413 AUTOMAKE_INPUTS = @MAINT@ $(srcdir)/aclocal.m4 $(srcdir)/lib/Makefile.am
414 $(srcdir)/lib/Makefile.in: $(AUTOMAKE_INPUTS)
415 cd $(srcdir) && automake --gnu -a -c lib/Makefile
416 am--refresh:
381 417
382 $(srcdir)/src/config.in: $(srcdir)/src/stamp-h.in 418 $(srcdir)/src/config.in: $(srcdir)/src/stamp-h.in
383 @ # Usually, there's no need to rebuild src/config.in just 419 @ # Usually, there's no need to rebuild src/config.in just
384 @ # because stamp-h.in has changed (since building stamp-h.in 420 @ # because stamp-h.in has changed (since building stamp-h.in
385 @ # refreshes config.in as well), but if config.in is missing 421 @ # refreshes config.in as well), but if config.in is missing
708 ### is rarely necessary and takes a lot of time. 744 ### is rarely necessary and takes a lot of time.
709 mostlyclean: FRC 745 mostlyclean: FRC
710 (cd src; $(MAKE) $(MFLAGS) mostlyclean) 746 (cd src; $(MAKE) $(MFLAGS) mostlyclean)
711 (cd oldXMenu; $(MAKE) $(MFLAGS) mostlyclean) 747 (cd oldXMenu; $(MAKE) $(MFLAGS) mostlyclean)
712 (cd lwlib; $(MAKE) $(MFLAGS) mostlyclean) 748 (cd lwlib; $(MAKE) $(MFLAGS) mostlyclean)
749 (cd lib; $(MAKE) $(MFLAGS) mostlyclean)
713 (cd lib-src; $(MAKE) $(MFLAGS) mostlyclean) 750 (cd lib-src; $(MAKE) $(MFLAGS) mostlyclean)
714 -(cd doc/emacs && $(MAKE) $(MFLAGS) mostlyclean) 751 -(cd doc/emacs && $(MAKE) $(MFLAGS) mostlyclean)
715 -(cd doc/misc && $(MAKE) $(MFLAGS) mostlyclean) 752 -(cd doc/misc && $(MAKE) $(MFLAGS) mostlyclean)
716 -(cd doc/lispref && $(MAKE) $(MFLAGS) mostlyclean) 753 -(cd doc/lispref && $(MAKE) $(MFLAGS) mostlyclean)
717 -(cd doc/lispintro && $(MAKE) $(MFLAGS) mostlyclean) 754 -(cd doc/lispintro && $(MAKE) $(MFLAGS) mostlyclean)
727 ### Delete `.dvi' files here if they are not part of the distribution. 764 ### Delete `.dvi' files here if they are not part of the distribution.
728 clean: FRC 765 clean: FRC
729 (cd src; $(MAKE) $(MFLAGS) clean) 766 (cd src; $(MAKE) $(MFLAGS) clean)
730 (cd oldXMenu; $(MAKE) $(MFLAGS) clean) 767 (cd oldXMenu; $(MAKE) $(MFLAGS) clean)
731 (cd lwlib; $(MAKE) $(MFLAGS) clean) 768 (cd lwlib; $(MAKE) $(MFLAGS) clean)
769 (cd lib; $(MAKE) $(MFLAGS) clean)
732 (cd lib-src; $(MAKE) $(MFLAGS) clean) 770 (cd lib-src; $(MAKE) $(MFLAGS) clean)
733 -(cd doc/emacs && $(MAKE) $(MFLAGS) clean) 771 -(cd doc/emacs && $(MAKE) $(MFLAGS) clean)
734 -(cd doc/misc && $(MAKE) $(MFLAGS) clean) 772 -(cd doc/misc && $(MAKE) $(MFLAGS) clean)
735 -(cd doc/lispref && $(MAKE) $(MFLAGS) clean) 773 -(cd doc/lispref && $(MAKE) $(MFLAGS) clean)
736 -(cd doc/lispintro && $(MAKE) $(MFLAGS) clean) 774 -(cd doc/lispintro && $(MAKE) $(MFLAGS) clean)
751 rm -f config.status Makefile ${SUBDIR_MAKEFILES} 789 rm -f config.status Makefile ${SUBDIR_MAKEFILES}
752 distclean: FRC 790 distclean: FRC
753 (cd src; $(MAKE) $(MFLAGS) distclean) 791 (cd src; $(MAKE) $(MFLAGS) distclean)
754 (cd oldXMenu; $(MAKE) $(MFLAGS) distclean) 792 (cd oldXMenu; $(MAKE) $(MFLAGS) distclean)
755 (cd lwlib; $(MAKE) $(MFLAGS) distclean) 793 (cd lwlib; $(MAKE) $(MFLAGS) distclean)
794 (cd lib; $(MAKE) $(MFLAGS) distclean)
756 (cd lib-src; $(MAKE) $(MFLAGS) distclean) 795 (cd lib-src; $(MAKE) $(MFLAGS) distclean)
757 (cd doc/emacs && $(MAKE) $(MFLAGS) distclean) 796 (cd doc/emacs && $(MAKE) $(MFLAGS) distclean)
758 (cd doc/misc && $(MAKE) $(MFLAGS) distclean) 797 (cd doc/misc && $(MAKE) $(MFLAGS) distclean)
759 (cd doc/lispref && $(MAKE) $(MFLAGS) distclean) 798 (cd doc/lispref && $(MAKE) $(MFLAGS) distclean)
760 (cd doc/lispintro && $(MAKE) $(MFLAGS) distclean) 799 (cd doc/lispintro && $(MAKE) $(MFLAGS) distclean)
767 ### needs to be deleted in order to force a bootstrap from a clean state. 806 ### needs to be deleted in order to force a bootstrap from a clean state.
768 bootstrap-clean: FRC 807 bootstrap-clean: FRC
769 (cd src; $(MAKE) $(MFLAGS) bootstrap-clean) 808 (cd src; $(MAKE) $(MFLAGS) bootstrap-clean)
770 (cd oldXMenu; $(MAKE) $(MFLAGS) maintainer-clean) 809 (cd oldXMenu; $(MAKE) $(MFLAGS) maintainer-clean)
771 (cd lwlib; $(MAKE) $(MFLAGS) maintainer-clean) 810 (cd lwlib; $(MAKE) $(MFLAGS) maintainer-clean)
811 (cd lib; $(MAKE) $(MFLAGS) maintainer-clean)
772 (cd lib-src; $(MAKE) $(MFLAGS) maintainer-clean) 812 (cd lib-src; $(MAKE) $(MFLAGS) maintainer-clean)
773 -(cd doc/emacs && $(MAKE) $(MFLAGS) maintainer-clean) 813 -(cd doc/emacs && $(MAKE) $(MFLAGS) maintainer-clean)
774 -(cd doc/misc && $(MAKE) $(MFLAGS) maintainer-clean) 814 -(cd doc/misc && $(MAKE) $(MFLAGS) maintainer-clean)
775 -(cd doc/lispref && $(MAKE) $(MFLAGS) maintainer-clean) 815 -(cd doc/lispref && $(MAKE) $(MFLAGS) maintainer-clean)
776 -(cd doc/lispintro && $(MAKE) $(MFLAGS) maintainer-clean) 816 -(cd doc/lispintro && $(MAKE) $(MFLAGS) maintainer-clean)
787 ### One exception, however: `make maintainer-clean' should not delete 827 ### One exception, however: `make maintainer-clean' should not delete
788 ### `configure' even if `configure' can be remade using a rule in the 828 ### `configure' even if `configure' can be remade using a rule in the
789 ### Makefile. More generally, `make maintainer-clean' should not delete 829 ### Makefile. More generally, `make maintainer-clean' should not delete
790 ### anything that needs to exist in order to run `configure' and then 830 ### anything that needs to exist in order to run `configure' and then
791 ### begin to build the program. 831 ### begin to build the program.
832 top_maintainer_clean=\
833 ${top_distclean}; \
834 rm -fr autom4te.cache; \
835 rm -f aclocal.m4 lib/gnulib.mk m4/gnulib-cache.m4
792 maintainer-clean: bootstrap-clean FRC 836 maintainer-clean: bootstrap-clean FRC
793 (cd src; $(MAKE) $(MFLAGS) maintainer-clean) 837 (cd src; $(MAKE) $(MFLAGS) maintainer-clean)
838 (cd lib; $(MAKE) $(MFLAGS) maintainer-clean)
794 (cd lisp; $(MAKE) $(MFLAGS) maintainer-clean) 839 (cd lisp; $(MAKE) $(MFLAGS) maintainer-clean)
795 ${top_distclean} 840 ${top_maintainer_clean}
796 841
797 ### This doesn't actually appear in the coding standards, but Karl 842 ### This doesn't actually appear in the coding standards, but Karl
798 ### says GCC supports it, and that's where the configuration part of 843 ### says GCC supports it, and that's where the configuration part of
799 ### the coding standards seem to come from. It's like distclean, but 844 ### the coding standards seem to come from. It's like distclean, but
800 ### it deletes backup and autosave files too. 845 ### it deletes backup and autosave files too.
801 extraclean: 846 extraclean:
802 for i in ${SUBDIR} leim; do (cd $$i; $(MAKE) $(MFLAGS) extraclean); done 847 for i in ${SUBDIR} leim; do (cd $$i; $(MAKE) $(MFLAGS) extraclean); done
803 ${top_distclean} 848 ${top_maintainer_clean}
804 -rm -f config-tmp-* 849 -rm -f config-tmp-*
805 -rm -f *~ \#* 850 -rm -f *~ \#*
806 851
807 # The src subdir knows how to do the right thing 852 # The src subdir knows how to do the right thing
808 # even when the build directory and source dir are different. 853 # even when the build directory and source dir are different.
809 TAGS tags: lib-src src 854 TAGS tags: lib lib-src src
810 cd src; $(MAKE) tags 855 cd src; $(MAKE) tags
811 856
812 check: 857 check:
813 @echo "We don't have any tests for GNU Emacs yet." 858 @echo "We don't have any tests for GNU Emacs yet."
814 859