Save the variable buffer content, not a potentially old pointer to it.
[make.git] / Makefile.DOS.template
blob0f0b9700d16cd9d6fcaf38b1219270bef220b8ea
1 # -*-Makefile-*- template for DJGPP
2 # Makefile.in generated automatically by automake 1.2 from Makefile.am
4 # Copyright (C) 1994-2012 Free Software Foundation, Inc.
5 # This file is part of GNU Make.
7 # GNU Make is free software; you can redistribute it and/or modify it under
8 # the terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 3 of the License, or (at your option) any later
10 # version.
12 # GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
15 # details.
17 # You should have received a copy of the GNU General Public License along with
18 # this program.  If not, see <http://www.gnu.org/licenses/>.
20 SHELL = /bin/sh
22 srcdir = .
23 VPATH = $(srcdir)
24 # $DJDIR is defined automatically by DJGPP to point
25 # to the root of the DJGPP installation tree.
26 prefix = /dev/env/DJDIR
27 exec_prefix = ${prefix}
29 bindir = /bin
30 datadir = /share
31 libdir = /lib
32 infodir = /info
33 mandir = /man
34 includedir = /include
35 oldincludedir = c:/djgpp/include
37 DESTDIR = /dev/env/DJDIR
39 pkgdatadir = $(datadir)/make
40 pkglibdir = $(libdir)/make
41 pkgincludedir = $(includedir)/make
42 localedir = $(datadir)/locale
44 INSTALL = ${exec_prefix}/bin/ginstall -c
45 INSTALL_PROGRAM = ${exec_prefix}/bin/ginstall -c
46 INSTALL_DATA = ${exec_prefix}/bin/ginstall -c -m 644
47 INSTALL_SCRIPT = ${exec_prefix}/bin/ginstall -c
48 transform = s,x,x,
50 # This will fail even if they don't have a Unix-like shell (stock DOS
51 # shell doesn't know about `false').  The only difference is that they
52 # get "Error -1" instead of "Error 1".
53 EXIT_FAIL = false
55 NORMAL_INSTALL = :
56 PRE_INSTALL = :
57 POST_INSTALL = :
58 NORMAL_UNINSTALL = :
59 PRE_UNINSTALL = :
60 POST_UNINSTALL = :
61 EXEEXT = .exe
62 OBJEXT = o
64 AR = ar
65 AWK = gawk
66 CC = gcc
67 CPP = gcc -E
68 LIBOBJS =
69 MAKEINFO = ${exec_prefix}/bin/makeinfo
70 PACKAGE = make
71 PERL = perl
72 RANLIB = ranlib
73 REMOTE = stub
74 VERSION = %VERSION%
76 AUTOMAKE_OPTIONS = 1.2
78 bin_PROGRAMS =  %PROGRAMS%$(EXEEXT)
80 make_SOURCES =  %SOURCES%
81 # This should include the glob/ prefix
82 libglob_a_SOURCES =     %GLOB_SOURCES%
83 make_LDADD =      glob/libglob.a
85 man_MANS =      make.1
87 INCLUDES =      -I$(srcdir)/glob -DLIBDIR=\"$(prefix)$(libdir)\" -DINCLUDEDIR=\"$(prefix)$(includedir)\" -DLOCALEDIR=\"$(prefix)$(localedir)\"
89 BUILT_SOURCES = README build.sh-in
91 EXTRA_DIST =    $(BUILT_SOURCES) $(man_MANS) README.customs remote-cstms.c  make-stds.texi texinfo.tex SCOPTIONS SMakefile  Makefile.ami README.Amiga config.ami amiga.c amiga.h  NMakefile README.DOS configh.dos configure.bat makefile.com  README.W32 build_w32.bat config.h-W32 subproc.bat make.lnk  config.h-vms makefile.vms readme.vms vmsdir.h vmsfunctions.c  vmsify.c gmk-default.scm gmk-default.h
93 SUBDIRS =       glob doc
94 mkinstalldirs = ${exec_prefix}/bin/gmkdir -p
95 CONFIG_HEADER = config.h
96 CONFIG_CLEAN_FILES =  build.sh
97 PROGRAMS =  $(bin_PROGRAMS)
99 MAKE_HOST = i386-pc-msdosdjgpp
102 DEFS =  -I. -I$(srcdir) -I.
103 CPPFLAGS = -DHAVE_CONFIG_H
104 LDFLAGS =
105 LIBS =
106 make_OBJECTS =  %OBJECTS%
107 make_DEPENDENCIES =    glob/libglob.a
108 make_LDFLAGS =
109 libglob_a_LIBADD =
110 libglob_a_OBJECTS =  %GLOB_OBJECTS%
111 noinst_LIBRARIES =      glob/libglob.a
112 CFLAGS = -O2 -g
113 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
114 LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
115 TEXI2DVI = texi2dvi
116 TEXINFO_TEX = $(srcdir)/config/texinfo.tex
117 INFO_DEPS = doc/make.info
118 DVIS = doc/make.dvi
119 TEXINFOS = doc/make.texi
120 noinst_TEXINFOS = doc/fdl.texi doc/make-stds.texi
121 man1dir = $(mandir)/man1
122 MANS = $(man_MANS)
124 NROFF = nroff
125 DIST_COMMON =  README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL Makefile.am  Makefile.in NEWS acconfig.h aclocal.m4 alloca.c build.sh-in config.h-in  configure configure.in getloadavg.c
127 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
129 TAR = gtar
130 GZIP = --best
131 SOURCES = $(make_SOURCES)
132 OBJECTS = $(make_OBJECTS)
133 HEADERS = $(wildcard $(srcdir)/*.h)
135 default: all
137 .SUFFIXES:
138 .SUFFIXES: .c .dvi .info .o .obj .ps .texi .tex .html
140 mostlyclean-hdr:
142 clean-hdr:
144 distclean-hdr:
145         -rm -f config.h
147 maintainer-clean-hdr:
149 mostlyclean-binPROGRAMS:
151 clean-binPROGRAMS:
152         -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
154 distclean-binPROGRAMS:
156 maintainer-clean-binPROGRAMS:
158 install-binPROGRAMS: $(bin_PROGRAMS)
159         @$(NORMAL_INSTALL)
160         $(mkinstalldirs) $(DESTDIR)$(bindir)
161         @list='$(bin_PROGRAMS)'; for p in $$list; do    if test -f $$p; then      echo "  $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p | sed '$(transform)'`";       $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p | sed '$(transform)'`;    else :; fi;  done
163 uninstall-binPROGRAMS:
164         $(NORMAL_UNINSTALL)
165         list='$(bin_PROGRAMS)'; for p in $$list; do    rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`.exe;  done
167 .c.o:
168         $(COMPILE) -c $<
170 clean-noinstLIBRARIES:
171         -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
173 mostlyclean-compile:
174         -rm -f *.$(OBJEXT) *$(EXEEXT) make.new core
176 clean-compile:
178 distclean-compile:
179         -rm -f *.tab.c *_tab.c
181 maintainer-clean-compile:
183 make$(EXEEXT): $(make_OBJECTS) $(make_DEPENDENCIES)
184         @command.com /c if exist make del make
185         @command.com /c if exist make.exe del make.exe
186         $(LINK) $(make_LDFLAGS) $(make_OBJECTS) $(make_LDADD) $(LIBS)
188 # Documentation
190 make.info: make.texi
191 make.dvi: make.texi
192 make.ps: make.dvi make.texi
193 make.html: make.texi
196 DVIPS = dvips
198 .texi.info:
199         @command.com /c if exist make.info* del make.info*
200         @command.com /c if exist make.i* del make.i*
201         $(MAKEINFO) -I$(srcdir) --no-split $< -o ./$@
203 .texi:
204         @command.com /c if exist make.info* del make.info*
205         @command.com /c if exist make.i* del make.i*
206         $(MAKEINFO) -I$(srcdir) --no-split $< -o ./$@
208 .texi.dvi:
209         TEXINPUTS="$(srcdir);$$TEXINPUTS"    MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
211 .dvi.ps:
212         $(DVIPS) $< -o $@
214 # Other documentation formats
216 html: html-recursive
218 .texi.html:
219         @command.com /c if exist make.html* del make.html*
220         $(MAKEINFO) --html -I$(srcdir) --no-split $< -o ./$@
222 install-info-am: $(INFO_DEPS)
223         @$(NORMAL_INSTALL)
224         $(mkinstalldirs) $(DESTDIR)$(infodir)
225         @for file in $(INFO_DEPS); do    iifile=`echo $$file | sed "s|doc/||"`;    d=$(srcdir);    for ifile in `cd $$d && echo $$file`; do      if test -f $$d/$$ifile; then        echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$iifile"; $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$iifile; else : ; fi;    done;  done
226         @$(POST_INSTALL)
227         @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then    for file in $(INFO_DEPS); do    iifile=`echo $$file | sed "s|doc/||"`;      echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$iifile";     install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$iifile || :;   done;  else : ; fi
229 uninstall-info:
230         $(PRE_UNINSTALL)
231         @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then    ii=yes;  else ii=; fi;  for file in $(INFO_DEPS); do    test -z $ii || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file;  done
232         $(NORMAL_UNINSTALL)
233         for file in $(INFO_DEPS); do (cd $(DESTDIR)$(infodir) && rm -f $$file);  done
235 dist-info: $(INFO_DEPS)
236         for base in $(INFO_DEPS); do    d=$(srcdir);    for file in `cd $$d && eval echo $$base*`; do      test -f $(distdir)/$$file      || ln $$d/$$file $(distdir)/$$file 2> /dev/null      || cp -p $$d/$$file $(distdir)/$$file;    done;  done
238 mostlyclean-aminfo:
239         -rm -f $(srcdir)/doc/make.aux $(srcdir)/doc/make.cp $(srcdir)/doc/make.cps $(srcdir)/doc/make.dvi \
240           $(srcdir)/doc/make.fn $(srcdir)/doc/make.fns $(srcdir)/doc/make.ky $(srcdir)/doc/make.kys \
241           $(srcdir)/doc/make.ps $(srcdir)/doc/make.log $(srcdir)/doc/make.pg $(srcdir)/doc/make.toc \
242           $(srcdir)/doc/make.tp $(srcdir)/doc/make.tps $(srcdir)/doc/make.vr $(srcdir)/doc/make.vrs \
243           $(srcdir)/doc/make.op $(srcdir)/doc/make.tr $(srcdir)/doc/make.cv $(srcdir)/doc/make.cn \
244           $(srcdir)/doc/make.html
246 clean-aminfo:
248 distclean-aminfo:
250 maintainer-clean-aminfo:
251         for i in $(INFO_DEPS); do rm -f $$i*; done
253 install-man1:
254         $(mkinstalldirs) $(DESTDIR)$(man1dir)
255         @list='$(man1_MANS)'; \
256         l2='$(man_MANS)'; for i in $$l2; do \
257           case "$$i" in \
258             *.1*) list="$$list $$i" ;; \
259           esac; \
260         done; \
261         for i in $$list; do \
262           if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
263           else file=$$i; fi; \
264           ext=`echo $$i | sed -e 's/^.*\\.//'`; \
265           inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
266           inst=`echo $$inst | sed '$(transform)'`.$$ext; \
267           echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
268           $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
269         done
271 uninstall-man1:
272         @list='$(man1_MANS)'; \
273         l2='$(man_MANS)'; for i in $$l2; do \
274           case "$$i" in \
275             *.1*) list="$$list $$i" ;; \
276           esac; \
277         done; \
278         for i in $$list; do \
279           ext=`echo $$i | sed -e 's/^.*\\.//'`; \
280           inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
281           inst=`echo $$inst | sed '$(transform)'`.$$ext; \
282           echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
283           rm -f $(DESTDIR)$(man1dir)/$$inst; \
284         done
285 install-man: $(MANS)
286         @$(NORMAL_INSTALL)
287         $(MAKE) install-man1
288 uninstall-man:
289         @$(NORMAL_UNINSTALL)
290         $(MAKE) uninstall-man1
292 # Assume that the only thing to do in glob is to build libglob.a,
293 # but do a sanity check: if $SUBDIRS will ever have more than
294 # a single directory, yell bloody murder.
295 all-recursive:
296 ifeq ($(findstring glob, $(SUBDIRS)), glob)
297         @command.com /c if not exist glob\\nul md glob
298         @echo Making all in glob
299         $(MAKE) -C glob -f ../Makefile INCLUDES='-I$(srcdir) -I$(srcdir)/glob' DEFS='-I.. -I$(srcdir)' VPATH=$(srcdir)/glob libglob.a
300 endif
302 $(SUBDIRS):
303         command.com /c md $@
305 libglob.a: $(libglob_a_OBJECTS)
306         command.com /c if exist libglob.a del libglob.a
307         $(AR) cru libglob.a $(libglob_a_OBJECTS) $(libglob_a_LIBADD)
308         $(RANLIB) libglob.a
310 mostlyclean-recursive clean-recursive distclean-recursive \
311 maintainer-clean-recursive check-recursive:
312 ifeq ($(words $(SUBDIRS)), 2)
313         @echo Making $(shell echo $@ | sed s/-recursive//) in glob
314         $(MAKE) -C glob -f ../Makefile $(shell echo $@ | sed s/-recursive//)-am
315         @echo Making $(shell echo $@ | sed s/-recursive//) in doc
316         $(MAKE) -C doc -f ../Makefile $(shell echo $@ | sed s/-recursive//)-am
317 else
318         @echo FATAL: There is more than two directory in "($(SUBDIRS))"
319         @$(EXIT_FAIL)
320 endif
322 tags-in-glob: $(libglob_a_SOURCES)
323         etags $(addprefix $(srcdir)/,$^) -o ./glob/TAGS
325 tags-recursive:
326 ifeq ($(words $(SUBDIRS)), 2)
327         $(MAKE) tags-in-glob
328 else
329         @echo FATAL: There is more than two directory in "($(SUBDIRS))"
330         @$(EXIT_FAIL)
331 endif
333 tags: TAGS
335 ID: $(HEADERS) $(SOURCES)
336         mkid $(srcdir)/$(SOURCES) $(srcdir)/$(libglob_a_SOURCES) ./config.h $(HEADERS)
338 TAGS: tags-recursive $(HEADERS) $(srcdir)/$(SOURCES) config.h $(TAGS_DEPENDENCIES)
339         etags -i ./glob/TAGS $(ETAGS_ARGS) $(srcdir)/$(SOURCES) ./config.h $(HEADERS)
341 mostlyclean-tags:
343 clean-tags:
345 distclean-tags:
346         -rm -f TAGS ID
348 maintainer-clean-tags:
350 distdir = $(PACKAGE)-$(VERSION)
351 top_distdir = $(distdir)
353 # This target untars the dist file and tries a VPATH configuration.  Then
354 # it guarantees that the distribution is self-contained by making another
355 # tarfile.
356 distcheck: dist
357         rm -rf $(distdir)
358         GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
359         mkdir $(distdir)/=build
360         mkdir $(distdir)/=inst
361         dc_install_base=`cd $(distdir)/=inst && pwd`;  cd $(distdir)/=build    && ../configure --srcdir=.. --prefix=$$dc_install_base    && $(MAKE)    && $(MAKE) dvi    && $(MAKE) check    && $(MAKE) install    && $(MAKE) installcheck    && $(MAKE) dist
362         rm -rf $(distdir)
363         @echo "========================";  echo "$(distdir).tar.gz is ready for distribution";  echo "========================"
364 dist: distdir
365         -chmod -R a+r $(distdir)
366         GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
367         rm -rf $(distdir)
368 dist-all: distdir
369         -chmod -R a+r $(distdir)
370         GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
371         rm -rf $(distdir)
372 distdir: $(DISTFILES)
373         rm -rf $(distdir)
374         mkdir $(distdir)
375         -chmod 777 $(distdir)
376         @for file in $(DISTFILES); do d=$(srcdir); test -f $(distdir)/$$file || ln $$d/$$file $(distdir)/$$file 2> /dev/null || cp -p $$d/$$file $(distdir)/$$file; done; for subdir in $(SUBDIRS); do test -d $(distdir)/$$subdir || mkdir $(distdir)/$$subdir || exit 1; chmod 777 $(distdir)/$$subdir; (cd $$subdir && $(MAKE) top_distdir=../$(top_distdir)/$$subdir distdir=../$(distdir)/$$subdir distdir) || exit 1; done
377         $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
378         $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
380 info: info-recursive
381 info-recursive:
382 ifeq ($(findstring doc, $(SUBDIRS)), doc)
383         @command.com /c if not exist doc\\nul md doc
384         @echo Making all in doc
385         $(MAKE) -C doc -f ../Makefile VPATH=$(srcdir)/doc make.info
386 endif
388 dvi: dvi-recursive
389 dvi-recursive:
390 ifeq ($(findstring doc, $(SUBDIRS)), doc)
391         @command.com /c if not exist doc\\nul md doc
392         @echo Making all in doc
393         $(MAKE) -C doc -f ../Makefile VPATH=$(srcdir)/doc make.dvi
394 endif
396 ps: ps-recursive
397 ps-recursive:
398 ifeq ($(findstring doc, $(SUBDIRS)), doc)
399         @command.com /c if not exist doc\\nul md doc
400         @echo Making all in doc
401         $(MAKE) -C doc -f ../Makefile VPATH=$(srcdir)/doc make.ps
402 endif
404 html-recursive:
405 ifeq ($(findstring doc, $(SUBDIRS)), doc)
406         @command.com /c if not exist doc\\nul md doc
407         @echo Making all in doc
408         $(MAKE) -C doc -f ../Makefile VPATH=$(srcdir)/doc make.html
409 endif
411 check: all-am check-recursive check-local
412         @:
413 installcheck: installcheck-recursive
414 all-recursive-am: config.h
415         $(MAKE) all-recursive
417 all-am: Makefile $(PROGRAMS) config.h info
419 install-exec-am: install-binPROGRAMS
421 install-data-am: install-info-am
423 uninstall-am: uninstall-binPROGRAMS uninstall-info
425 install-exec: install-exec-recursive install-exec-am
426         @$(NORMAL_INSTALL)
428 install-data: install-data-recursive install-data-am
429         @$(NORMAL_INSTALL)
431 install-recursive uninstall-recursive:
432         @:
434 install: install-recursive install-exec-am install-data-am
435         @:
437 uninstall: uninstall-recursive uninstall-am
439 all: all-recursive-am all-am
441 install-strip:
442         $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
443 installdirs: installdirs-recursive
444         $(mkinstalldirs)  $(bindir) $(infodir)
447 mostlyclean-generic:
448         -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
450 clean-generic:
451         -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
453 distclean-generic:
454         -rm -f Makefile $(DISTCLEANFILES)
455         -rm -f config.cache config.log stamp-h stamp-h[0-9]*
456         -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
458 maintainer-clean-generic:
459         -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
460         -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
461 mostlyclean-am:  mostlyclean-hdr mostlyclean-binPROGRAMS  mostlyclean-compile mostlyclean-aminfo mostlyclean-tags  mostlyclean-generic
463 clean-am:  clean-hdr clean-binPROGRAMS clean-compile clean-aminfo  clean-tags clean-generic mostlyclean-am
465 distclean-am:  distclean-hdr distclean-binPROGRAMS distclean-compile  distclean-aminfo distclean-tags distclean-generic  clean-am
467 maintainer-clean-am:  maintainer-clean-hdr maintainer-clean-binPROGRAMS  maintainer-clean-compile maintainer-clean-aminfo  maintainer-clean-tags maintainer-clean-generic  distclean-am
469 mostlyclean:  mostlyclean-recursive mostlyclean-am
471 clean: clean-noinstLIBRARIES clean-recursive clean-am
473 distclean:  distclean-recursive distclean-am
474         rm -f config.status
476 maintainer-clean:  maintainer-clean-recursive maintainer-clean-am
477         @echo "This command is intended for maintainers to use;"
478         @echo "it deletes files that may require special tools to rebuild."
479         rm -f config.status
481 .PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
482 maintainer-clean-hdr mostlyclean-binPROGRAMS distclean-binPROGRAMS \
483 clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS \
484 install-binPROGRAMS mostlyclean-compile distclean-compile clean-compile \
485 maintainer-clean-compile install-info-am uninstall-info \
486 mostlyclean-aminfo distclean-aminfo clean-aminfo \
487 maintainer-clean-aminfo install-data-recursive uninstall-data-recursive \
488 install-exec-recursive uninstall-exec-recursive installdirs-recursive \
489 uninstalldirs-recursive all-recursive check-recursive check-am \
490 installcheck-recursive info-recursive dvi-recursive \
491 mostlyclean-recursive distclean-recursive clean-recursive \
492 maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
493 distclean-tags clean-tags maintainer-clean-tags distdir \
494 mostlyclean-depend distclean-depend clean-depend \
495 maintainer-clean-depend info dvi check-local installcheck \
496 all-recursive-am all-am install-exec-am install-data-am uninstall-am \
497 install-exec install-data install uninstall all installdirs \
498 mostlyclean-generic distclean-generic clean-generic \
499 maintainer-clean-generic clean mostlyclean distclean maintainer-clean \
500 html
503 # --------------- Local DIST Section
505 # Install the w32 subdirectory
507 dist-hook:
508         (cd $(srcdir); \
509          w32=`find w32 -follow \( -name CVS -prune \) -o -type f -print`; \
510          tar chf - $$w32) \
511         | (cd $(distdir); tar xfBp -)
513 # --------------- Local CHECK Section
515 # Note: check-loadavg is NOT a prerequisite of check-local, since
516 # there's no uptime utility, and the test it does doesn't make sense
517 # on MSDOS anyway.
518 check-local: check-shell check-regression
519         @banner=" Regression PASSED: GNU Make $(VERSION) ($(MAKE_HOST)) built with $(CC) "; \
520         dashes=`echo "$$banner" | sed s/./=/g`; \
521         echo; \
522         echo "$$dashes"; \
523         echo "$$banner"; \
524         echo "$$dashes"; \
525         echo
527 .PHONY: check-loadavg check-shell check-regression
529 # > check-shell
531 # check-shell is designed to fail if they don't have a Unixy shell
532 # installed.  The test suite requires such a shell.
533 check-shell:
534         @echo If Make says Error -1, you do not have Unix-style shell installed
535         @foo=bar.exe :
537 # > check-loadavg
539 loadavg: loadavg.c config.h
540         @rm -f loadavg
541         $(LINK) -DTEST $(make_LDFLAGS) loadavg.c $(LIBS)
542 # We copy getloadavg.c into a different file rather than compiling it
543 # directly because some compilers clobber getloadavg.o in the process.
544 loadavg.c: getloadavg.c
545         ln $(srcdir)/getloadavg.c loadavg.c || \
546         cp $(srcdir)/getloadavg.c loadavg.c
547 check-loadavg: loadavg
548         @echo The system uptime program believes the load average to be:
549         -uptime
550         @echo The GNU load average checking code believes:
551         -./loadavg
553 # > check-regression
555 # Look for the make test suite, and run it if found.  Look in MAKE_TEST if
556 # specified, or else in the srcdir or the distdir, their parents, and _their_
557 # parents.
559 check-regression:
560         @if test -f "$(srcdir)/tests/run_make_tests"; then \
561           if $(PERL) -v >/dev/null 2>&1; then \
562             case `cd $(srcdir); pwd` in `pwd`) : ;; \
563               *) test -d tests || mkdir tests; \
564                  for f in run_make_tests run_make_tests.pl test_driver.pl scripts; do \
565                    rm -rf tests/$$f; cp -pr $(srcdir)/tests/$$f tests; \
566                  done ;; \
567             esac; \
568             echo "cd tests && $(PERL) ./run_make_tests.pl -make ../make.exe $(MAKETESTFLAGS)"; \
569             cd tests && $(PERL) ./run_make_tests.pl -make ../make.exe $(MAKETESTFLAGS); \
570           else \
571             echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
572           fi; \
573          else \
574           echo "Can't find the GNU Make test suite ($(srcdir)/tests)."; \
575          fi
577 # --------------- Maintainer's Section
579 # Note this requires GNU make.  Not to worry, since it will only be included
580 # in the Makefile if we're in the maintainer's environment.
581 #include $(srcdir)/maintMakefile
583 # Tell versions [3.59,3.63) of GNU make to not export all variables.
584 # Otherwise a system limit (for SysV at least) may be exceeded.
585 .NOEXPORT:
587 # --------------- DEPENDENCIES