source: git/factory/GNUmakefile.in @ 7bf145

spielwiese
Last change on this file since 7bf145 was 36734cd, checked in by Hans Schoenemann <hannes@…>, 14 years ago
git-svn-id: file:///usr/local/Singular/svn/trunk@12777 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 17.7 KB
Line 
1# @configure_input@
2# $Id$
3
4#
5# GNUmakefile.in - used by `configure' to create `GNUmakefile', the
6#   top level makefile for Factory.
7#
8# In general, you should let `configure' guess the correct values
9# for the variables below.  But if something seriously goes wrong
10# in configuring, please inform the authors and feel free to
11# edit the marked section.
12#
13# See the `INSTALL' file for information on how to build Factory.
14#
15# Note: Use GNU `make' (`gmake') to make with this makefile.
16#
17
18############### START OF CONFIGURABLE SECTION ###############
19
20SHELL =         /bin/sh
21
22#
23# - versions.  Do not change version here !!!
24#
25version =       @factory_version@
26distname =      factory-$(version)
27
28#
29# - paths.
30#
31prefix =        @prefix@
32exec_prefix =   @exec_prefix@
33libdir =        @libdir@
34datadir =       @datadir@
35gftabledir =    @gftabledir@
36includedir =    @includedir@
37templatedir =   @templatedir@
38
39srcdir =        @srcdir@
40VPATH =         @srcdir@
41
42#
43# - the name of the game.
44#
45libfactory =    @libfactory@
46
47#
48# - programs.
49#
50CC =            @CC@
51CXX =           @CXX@
52# seems configure sometimes finds non-BSD install, so we better
53# hardcode path to our install-sh
54INSTALL =       $(srcdir)/bin/install-sh -c
55INSTALL_DATA =  @INSTALL_DATA@
56INSTALL_PROGRAM=@INSTALL_PROGRAM@
57RANLIB =        @RANLIB@
58
59LN_S =          @LN_S@
60AR =            @AR@
61BISON =         @BISON@
62MKINSTALLDIRS = @FACTORY_MKINSTALLDIRS@
63MAKEHEADER =    @FACTORY_MAKEHEADER@
64
65#
66# - flags.
67#
68CFLAGS =        @CFLAGS@
69CPPFLAGS =      @CPPFLAGS@
70CXXFLAGS =      @CXXFLAGS@
71DEFS =          @DEFS@
72LDFLAGS =       @LDFLAGS@
73LIBS =          @LIBS@
74
75ARFLAGS =       @ARFLAGS@
76MAKEHEADERFLAGS=@MAKEHEADERFLAGS@
77
78#
79# - some other variables.
80#
81factorysrc =    @factorysrc@
82factoryincl =   @factoryincl@
83memmansrc =     @memmansrc@
84memmanincl =    @memmanincl@
85
86alltargets =    @alltargets@
87installtargets =@installtargets@
88uninstalltargets=@uninstalltargets@
89
90############### END OF CONFIGURABLE SECTION ###############
91
92#
93# - compiler flags.
94#
95WARNFLAGS =     -w
96
97# flags to translate library c files
98LIBCFLAGS =     $(WARNFLAGS) \
99                -I. -I$(srcdir) -I$(includedir) \
100                $(DEFS) $(CPPFLAGS) $(CFLAGS)
101
102# flags to translate library c++ files
103LIBCXXFLAGS =   $(WARNFLAGS) -fno-implicit-templates \
104                -I. -I$(srcdir) -I$(includedir) \
105                $(DEFS) $(CPPFLAGS) $(CXXFLAGS)
106
107LIBCGGFLAGS =   $(WARNFLAGS) -fno-implicit-templates \
108                -I. -I$(srcdir) -I$(includedir) \
109                $(DEFS) $(CPPFLAGS)
110
111# flags to translate ftmpl_inst.cc
112TMPLCXXFLAGS =  $(LIBCXXFLAGS)
113
114# flags to link test programs
115TESTCXXFLAGS =  $(LIBCXXFLAGS)
116
117# flags to link test programs
118TESTLDFLAGS =   $(LIBS) $(LDFLAGS)
119
120# flags to create dependency lists
121DEPCXXFLAGS =   -I. -I$(srcdir) -I$(includedir) \
122                $(DEFS) $(CPPFLAGS)
123
124#
125# - source files.
126#
127
128# factory source files
129basefactorysrc := \
130                canonicalform.cc \
131                cf_algorithm.cc \
132                cf_binom.cc \
133                cf_char.cc \
134                cf_chinese.cc \
135                cf_cyclo.cc\
136                cf_eval.cc \
137                cf_factor.cc \
138                cf_factory.cc \
139                cf_gcd.cc \
140                cf_gcd_charp.cc \
141                cf_gcd_smallp.cc \
142                cf_generator.cc \
143                cf_globals.cc \
144                cf_inline.cc \
145                cf_irred.cc \
146                cf_iter.cc \
147                cf_iter_inline.cc \
148                cf_linsys.cc \
149                cf_map.cc \
150                cf_map_ext.cc \
151                cf_ops.cc \
152                cf_primes.cc \
153                cf_random.cc \
154                cf_resultant.cc \
155                cf_reval.cc \
156                cf_switches.cc \
157                cf_util.cc \
158                debug.cc \
159                fac_berlekamp.cc \
160                fac_cantzass.cc \
161                fac_distrib.cc \
162                fac_ezgcd.cc \
163                fac_iterfor.cc \
164                fac_multihensel.cc \
165                fac_multivar.cc \
166                fac_sqrfree.cc \
167                fac_univar.cc \
168                fac_util.cc \
169                fieldGCD.cc \
170                ffops.cc \
171                ffreval.cc \
172                gf_tabutil.cc \
173                gfops.cc \
174                imm.cc \
175                initgmp.cc \
176                int_cf.cc \
177                int_int.cc \
178                int_intdiv.cc \
179                int_poly.cc \
180                int_pp.cc \
181                int_rat.cc \
182                sm_sparsemod.cc \
183                sm_util.cc \
184                variable.cc \
185                NTLconvert.cc \
186                abs_fac.cc \
187                bifac.cc \
188                lgs.cc
189
190singfactorysrc := \
191                singext.cc
192useiofactorysrc := \
193                parseutil.cc \
194                readcf.y
195distfactorysrc := \
196                $(basefactorysrc) \
197                $(singfactorysrc) \
198                $(useiofactorysrc)
199doxysrc :=      \
200                $(basefactorysrc) \
201                parseutil.cc
202
203# factory object files and dependencies
204factoryobj1 :=  $(factorysrc:%.cc=%.o)
205factoryobj :=   $(factoryobj1:%.y=%.o)
206factorygobj :=  $(factorysrc:%.cc=%.og)
207factorypobj :=  $(factorysrc:%.cc=%.op)
208factorydep :=   $(factorysrc:%.cc=%.d)
209factorydep :=   $(factorydep:%.y=%.d)
210
211# factory header files
212basefactoryincl := \
213                assert.h \
214                canonicalform.h \
215                cf_algorithm.h \
216                cf_binom.h \
217                cf_cyclo.h\
218                cf_defs.h \
219                cf_eval.h \
220                cf_factory.h \
221                cf_gcd_smallp.h \
222                cf_generator.h \
223                cf_globals.h \
224                cf_irred.h \
225                cf_iter.h \
226                cf_map.h \
227                cf_map_ext.h \
228                cf_primes.h \
229                cf_primetab.h \
230                cf_random.h \
231                cf_reval.h \
232                cf_switches.h \
233                cf_util.h \
234                debug.h \
235                fac_berlekamp.h \
236                fac_cantzass.h \
237                fac_distrib.h \
238                fac_iterfor.h \
239                fac_multivar.h \
240                fac_sqrfree.h \
241                fac_univar.h \
242                fac_util.h \
243                fieldGCD.h \
244                ffops.h \
245                ffreval.h \
246                ftmpl_array.h \
247                ftmpl_factor.h \
248                ftmpl_functions.h \
249                ftmpl_list.h \
250                ftmpl_matrix.h \
251                gf_tabutil.h \
252                gfops.h \
253                gmpext.h \
254                imm.h \
255                int_cf.h \
256                int_int.h \
257                int_poly.h \
258                int_pp.h \
259                int_rat.h \
260                sm_sparsemod.h \
261                sm_util.h \
262                timing.h \
263                variable.h \
264                NTLconvert.h \
265                bifac.h \
266                bifacConfig.h \
267                lgs.h \
268                algext.h
269
270singfactoryincl := \
271                singext.h
272useiofactoryincl := \
273                parseutil.h
274distfactoryincl := \
275                $(basefactoryincl) \
276                $(singfactoryincl) \
277                $(useiofactoryincl)
278doxyincl :=     \
279                $(basefactoryincl) \
280                parseutil.h
281
282# memory manager source files
283basememmansrc := \
284                newdelete.cc
285newmemmansrc := \
286                mmalloc.c \
287                mmallocb.c \
288                mmallocs.c \
289                mmblock.c \
290                mmheap.c \
291                mminit.c \
292                mmspec.c \
293                mmutil.c
294oldmemmansrc := \
295                memutil.c
296distmemmansrc := \
297                $(basememmansrc) \
298                $(newmemmansrc) \
299                $(oldmemmansrc)
300
301# memory manager object files and dependencies
302memmanobj :=    $(memmansrc:.cc=.o)
303memmanobj :=    $(memmanobj:.c=.o)
304memmandep :=    $(memmansrc:.cc=.d)
305memmandep :=    $(memmandep:.c=.d)
306
307# memory manager header files
308newmemmanincl := \
309                mmprivate.h \
310                memman.h
311oldmemmanincl := \
312                memutil.h
313distmemmanincl := \
314                $(newmemmanincl) \
315                $(oldmemmanincl)
316
317# factory template files
318templatesrc :=  \
319                ftmpl_array.cc \
320                ftmpl_factor.cc \
321                ftmpl_functions.h \
322                ftmpl_list.cc \
323                ftmpl_matrix.cc
324templateincl := \
325                ftmpl_array.h \
326                ftmpl_factor.h \
327                ftmpl_list.h \
328                ftmpl_matrix.h
329
330# header templates
331hdrtemplsrc := \
332                factoryconf.template \
333                factory.template
334hdrtempldep :=  $(hdrtemplsrc:.template=.d)
335
336# FTE source files
337ftestsrc :=     \
338                ftest_io.cc \
339                ftest_util.cc \
340                ntl_util.cc
341
342# FTE header files
343ftestincl :=    \
344                ftest_io.h \
345                ftest_util.h \
346                ntl_util.h
347
348# FTE m4 source files (exported for `GNUmakefile' in `ftest/').
349# The variable `$(ftestm4develsrc)' may be already initialized
350# from the development `GNUmakefile'.
351ftestm4src :=   $(ftestm4develsrc) \
352                commonden.m4 \
353                degree.m4 \
354                deriv.m4 \
355                divides.m4 \
356                divrem.m4 \
357                extgcd.m4 \
358                factorize.m4 \
359                fbinops.m4 \
360                feval.m4 \
361                gcd.m4 \
362                gcd.ntl.m4 \
363                insert.m4 \
364                norm.m4 \
365                resultant.m4 \
366                revert.m4 \
367                sqrfree.m4 \
368                size.m4 \
369                totaldegree.m4
370export ftestm4src
371
372# other files from the FTE
373ftestdistfiles := \
374                ChangeLog \
375                GNUmakefile.in \
376                ftest_util.m4
377
378# FTE executables
379ftestexec :=    $(ftestm4src:.m4=)
380
381# all the C/C++ source files in the distribution
382distsrc :=      \
383                $(distfactorysrc) $(distmemmansrc) \
384                $(addprefix templates/,$(templatesrc)) \
385                $(addprefix ftest/,$(ftestsrc)) \
386                readcf.cc ftmpl_inst.cc \
387                gengftables.cc gengftables-conway.cc test_install.cc
388
389# all the C/C++ include files in the distribution
390distincl :=     \
391                $(distfactoryincl) $(distmemmanincl) \
392                $(addprefix templates/,$(templateincl)) \
393                $(addprefix ftest/,$(ftestincl))
394
395# all files for the Windows NT environment
396distntfiles :=  \
397                config.h nt.mak \
398                factory.h factoryconf.h \
399                INSTALL.nt
400
401# all files in the distribution
402distfiles :=    \
403                $(distsrc) $(distincl) $(hdrtemplsrc) \
404                $(addprefix ftest/,$(ftestm4src)) \
405                $(addprefix ftest/,$(ftestdistfiles)) \
406                GNUmakefile.in configure.in config.h.in configure \
407                ChangeLog README NEWS INSTALL \
408                factory.cfg gen_cf_gmp.template \
409                $(addprefix winnt/,$(distntfiles)) \
410                examples/GNUmakefile examples/application.cc \
411                examples/factorize.cc examples/gcd.cc \
412                bin/folding.el bin/fold-docu.el \
413                bin/install-sh bin/mkinstalldirs \
414                bin/makeheader bin/gen-readcf
415
416#
417# - phony targets.
418#
419.PHONY:         all cf mem dist depend \
420                clean mostlyclean distclean maintainer-clean \
421                install installcf installmem installgftables installtest \
422                uninstall uninstallcf uninstallmem uninstallgftables \
423                ftestall ftestclean ftestdistclean \
424                doxy doxyclean
425
426# we make these targets phony to make sure that they are
427# up to date when a new distribution is built
428.PHONY:         $(srcdir)/winnt/factory.h $(srcdir)/winnt/factoryconf.h
429
430#
431# - pattern rules.
432#
433
434# how to create library objets
435%.o: %.cc config.h
436        $(CXX) -c $< $(LIBCXXFLAGS) -o $@
437%.o: %.c config.h
438        $(CC) -c $< $(LIBCFLAGS) -o $@
439# the debug version:
440%.og: %.cc config.h
441        $(CXX) -g -c $< $(LIBCGGFLAGS) -o $@
442# the profiling version:
443%.op: %.cc config.h
444        $(CXX) -O -pg -c $< $(LIBCGGFLAGS) -o $@
445
446# how to create dependency files.  To avoid broken dependency files
447# (which in turn break this GNUmakefile) we first generate them in
448# a temporary file which we then move to the destination file.
449%.d: %.cc factoryconf.h config.h
450        echo $@ "\\" > $@tmp
451        $(CXX) -MM $< $(DEPCXXFLAGS) >> $@tmp
452        mv $@tmp $@
453%.d: %.c factoryconf.h config.h
454        echo $@ "\\" > $@tmp
455        $(CXX) -MM $< $(DEPCXXFLAGS) >> $@tmp
456        mv $@tmp $@
457%.d: %.template
458        echo $@ $(@:.d=.h) : "\\" > $@tmp
459        sed -n '/^\/\*MAKEHEADER/!d; n; s/^#include "//; s/"//; p;' $< | tr '\012' ' ' >> $@tmp
460        echo >> $@tmp
461        mv $@tmp $@
462
463# how to create header files from header templates
464%.h: %.template
465        $(MAKEHEADER) $(MAKEHEADERFLAGS) $< $@
466
467#
468# - building factory.
469#
470all:            $(alltargets)
471
472cf:             factoryconf.h factory.h $(libfactory) libsingcf_g.a
473
474mem:            libcfmem.a
475
476#
477# - explicit targets.
478#
479$(libfactory):  $(factoryobj)
480                $(AR) $(ARFLAGS) $@ $^
481                $(RANLIB) $@
482
483libsingcf_g.a:  $(factorygobj)
484                $(AR) $(ARFLAGS) $@ $^
485                $(RANLIB) $@
486
487libsingcf_p.a:  $(factorypobj)
488                $(AR) $(ARFLAGS) $@ $^
489                $(RANLIB) $@
490
491libcfmem.a:     $(memmanobj)
492                $(AR) $(ARFLAGS) $@ $^
493                $(RANLIB) $@
494
495ftmpl_inst.o:   ftmpl_inst.cc factoryconf.h factory.h \
496                $(addprefix templates/,$(templatesrc)) \
497                $(addprefix templates/,$(templateincl))
498                $(CXX) -c $< $(TMPLCXXFLAGS) -o $@
499
500# note that this is a non-source file which is distributed!
501$(srcdir)/readcf.cc: readcf.y
502                @./bin/gen-readcf "${BISON}"
503
504# note that these are non-source file which are distributed!
505# We do not specify any dependencies except the most important ones.
506$(srcdir)/winnt/factory.h: factory.template
507                $(MAKEHEADER) $(MAKEHEADERFLAGS) $< $@
508$(srcdir)/winnt/factoryconf.h: factoryconf.template winnt/config.h
509                $(MAKEHEADER) -I$(srcdir)/winnt $(MAKEHEADERFLAGS) $< $@
510
511# specify dependency in case user does not 'make depend'
512factoryconf.h:  config.h cf_gmp.h
513
514TAGS:
515                etags $(addprefix $(srcdir)/, $(distsrc) $(distincl))
516
517# check configuration before building executables
518conftest:
519                @if test -z "$(filter mem,$(alltargets))" \
520                  || test -z "$(filter readcf.y,$(factorysrc))" \
521                  || test -n "$(filter singext.cc,$(factorysrc))"; then \
522                  echo "To make this target you have to configure"; \
523                  echo "\`--without-Singular --with-memman --enable-streamio'."; \
524                  exit 1; \
525                fi
526
527#
528# - doxygen.
529#
530
531# files and environment variables to export for doxygen
532doxyfiles :=    $(addprefix $(srcdir)/,$(doxysrc) $(doxyincl))
533
534export version srcdir doxyfiles
535
536# doxygen targets
537doxy:           factory.cfg $(doxysrc) $(doxyincl)
538                doxygen $<
539
540doxyclean:
541                rm -rf doxygen
542
543#
544# - Factory Test Environment.
545#
546$(ftestexec):   conftest factoryconf.h factory.h libcf.a libcfmem.a ftmpl_inst.o
547                cd ftest && $(MAKE) $@
548                @if test -r "$@"; then \
549                  :; \
550                else \
551                  echo "$(LN_S) ftest/$@ $@"; \
552                  $(LN_S) ftest/$@ $@; \
553                fi
554
555ftestall:       $(ftestexec)
556
557ftestclean:
558                -cd ftest && $(MAKE) clean
559
560ftestdistclean:
561                -cd ftest && $(MAKE) distclean
562                -rmdir ftest
563
564#
565# - GF(q) table generation.
566#
567
568# these are not all dependencies, but the most important ones
569gengftables.o:  gengftables-conway.cc conftest factory.h gf_tabutil.h
570                $(CXX) -c $< $(TESTCXXFLAGS) -o $@
571
572gengftables:    gengftables.o libcf.a libcfmem.a ftmpl_inst.o
573                $(CXX) $^ $(TESTLDFLAGS) -o $@
574
575gftables:       gengftables
576                @echo "This command will take quite a long time to execute;"
577                @echo "maybe you want to get the tables directly via ftp (see"
578                @echo "the INSTALL file)."
579                $(MKINSTALLDIRS) gftables
580                ./gengftables
581
582#
583# - installation test program.
584#
585
586# compile installation test program.  do not look up
587# header files in current directory or in $(srcdir), but use
588# the header files from the directory where they should be
589# after installation.
590test_install.o: test_install.cc
591                $(CXX) -c $< $(TESTCXXFLAGS) -I- -I$(includedir) -o $@
592
593# the same we do for ftmpl_inst.o which for this reason is named
594# iftmpl_inst.o
595iftmpl_inst.o:
596                $(CXX) -c $(templatedir)/ftmpl_inst.cc $(TMPLCXXFLAGS) -I- -I$(includedir) -o $@
597
598# link installation test program
599test_install:   test_install.o iftmpl_inst.o
600                $(CXX) $^ -L$(libdir) -lcf -lcfmem $(TESTLDFLAGS) -o $@
601
602installtest:    test_install
603                @-if ./test_install; then \
604                  echo "Installation seems ok."; \
605                else \
606                  echo "Please check path of your GF(q) tables in config.h."; \
607                fi
608
609#
610# - install targets.
611#
612install:        $(installtargets)
613
614install_all:    install libsingcf_p.a
615                -$(INSTALL_DATA) libsingcf_p.a $(libdir)/libsingcf_p.a
616
617install-nolns: install
618
619installcf:      cf
620                $(MKINSTALLDIRS) $(libdir)
621                $(MKINSTALLDIRS) $(includedir)
622                $(MKINSTALLDIRS) $(templatedir)
623                $(INSTALL_DATA) $(libfactory) $(libdir)/$(libfactory)
624                -$(INSTALL_DATA) libsingcf_g.a $(libdir)/libsingcf_g.a
625                $(INSTALL_DATA) factory.h $(includedir)/factory.h
626                $(INSTALL_DATA) cf_gmp.h $(includedir)/cf_gmp.h
627                $(INSTALL_DATA) factoryconf.h $(includedir)/factoryconf.h
628                $(INSTALL_DATA) $(srcdir)/ftmpl_inst.cc $(templatedir)/ftmpl_inst.cc
629                for file in $(templatesrc) $(templateincl); do \
630                  $(INSTALL_DATA) $(srcdir)/templates/$$file $(templatedir)/$$file; \
631                done
632# we run `ranlib' another time for SUN machines
633                $(RANLIB) $(libdir)/$(libfactory)
634
635installmem:     mem
636                $(MKINSTALLDIRS) $(libdir)
637                $(INSTALL_DATA) libcfmem.a $(libdir)/libcfmem.a
638# once again: another run for SUN
639                $(RANLIB) $(libdir)/libcfmem.a
640
641# to a pity, this cannot be done automatically ...
642installgftables:
643                @echo "Copying GF(q) tables ..."
644                @if test -d gftables; then \
645                  $(MKINSTALLDIRS) $(gftabledir); \
646                  for file in gftables/gftable.*.*; do \
647                    $(INSTALL_DATA) $$file $(gftabledir); \
648                  done \
649                elif test -d "$(srcdir)"/gftables; then \
650                  $(MKINSTALLDIRS) $(gftabledir); \
651                  for file in "$(srcdir)"/gftables/gftable.*.*; do \
652                    $(INSTALL_DATA) $$file $(gftabledir); \
653                  done \
654                else \
655                  echo "Run 'make gftables' before installing them"; \
656                  exit 1; \
657                fi
658
659#
660# - uninstall targets.
661#
662uninstall:      $(uninstalltargets)
663
664uninstallcf:
665                -for file in $(templatesrc) $(templateincl); do \
666                  rm -f $(templatedir)/$$file; \
667                done
668                -rm -f $(templatedir)/ftmpl_inst.cc
669                -rm -f $(includedir)/factoryconf.h
670                -rm -f $(includedir)/factory.h
671                -rm -f $(libdir)/$(libfactory)
672                -rm -f $(libdir)/libsingcf_g.a
673                -rm -f $(libdir)/libsingcf_p.a
674                -rmdir $(templatedir)
675                -rmdir $(includedir)
676                -rmdir $(libdir)
677
678uninstallmem:
679                -rm -f $(libdir)/libcfmem.a
680                -rmdir $(libdir)
681
682uninstallgftables:
683                -rm -f $(gftabledir)/gftable.*.*
684                -rmdir $(gftabledir)
685
686#
687# - building a distribution.
688#
689dist:           $(srcdir)/readcf.cc $(srcdir)/configure \
690                $(srcdir)/winnt/factory.h $(srcdir)/winnt/factoryconf.h
691                rm -f $(distname).tgz
692                rm -rf $(distname)
693                $(MKINSTALLDIRS) $(distname)/bin
694                $(MKINSTALLDIRS) $(distname)/examples
695                $(MKINSTALLDIRS) $(distname)/ftest
696                $(MKINSTALLDIRS) $(distname)/winnt
697                $(MKINSTALLDIRS) $(distname)/templates
698                @echo "Copying files to distribution directory ..."
699                @for file in $(distfiles); do \
700                  ln $(srcdir)/$$file $(distname)/$$file; \
701                done
702                tar cf $(distname).tar $(distname)
703                gzip $(distname).tar
704                mv $(distname).tar.gz $(distname).tgz
705
706#
707# - cleaning up.
708#
709clean:          ftestclean
710                -rm -f $(libfactory) libcfmem.a libsingcf_g.a libsingcf_p.a \
711                  $(ftestexec) gengftables test_install \
712                  factoryconf.h factory.h *.o *.og *.op *.d *.dtmp cf_gmp.h
713
714# remove gftables only if we built them
715mostlyclean:    clean doxyclean
716                -rm -f TAGS
717                -if test ! -f gftables/README; then \
718                  rm -rf gftables; \
719                fi
720
721distclean:      ftestdistclean mostlyclean
722                -rm -f $(distname).tgz GNUmakefile stamp-h \
723                  config.cache config.log config.status config.h
724                -rm -rf $(distname)
725
726maintainer-clean: distclean
727                @echo "This command is intended for maintainers to use;"
728                @echo "it deletes files that require bison to rebuild."
729                -rm -f $(srcdir)/readcf.cc
730
731#
732# - dependencies.
733#
734# Do not generate them automatically if there are not any
735# dependencies at all.  this trick saves some time when you do
736# not want to compile but do some maintenance which do not
737# require the dependencies.  say 'make depend' to create the
738# dependencies explicitly.
739#
740depend:         $(factorydep) $(memmandep) $(hdrtempldep)
741
742ifneq ($(wildcard *.d),)
743  include $(factorydep) $(memmandep) $(hdrtempldep)
744endif
745
746#
747# - configure stuff.
748#
749$(srcdir)/configure: configure.in
750                @echo "WARNING: You need to rerun autoconf. I am proceeding, for now."
751                touch configure
752
753#               -cd $(srcdir) && autoconf
754
755# seems gmake needs at least a trivial command.  otherwise all
756# files which depend on config.h will be remade even if congig.h
757# did not change.
758config.h:       stamp-h
759                @:
760
761stamp-h:        config.h.in config.status
762                CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
763                echo timestamp > stamp-h
764
765GNUmakefile:    GNUmakefile.in config.status
766                CONFIG_FILES=GNUmakefile CONFIG_HEADERS= ./config.status
767
768ftest/GNUmakefile: ftest/GNUmakefile.in config.status
769                CONFIG_FILES=ftest/GNUmakefile CONFIG_HEADERS= ./config.status
770
771config.status:  configure
772                ./config.status --recheck
773
774# create cf_gmp.h
775cf_gmp.h: GNUmakefile gen_cf_gmp.template
776        echo "#!/bin/sh" >gen_cf_gmp.sh
777        echo "GMP_H_T=\"`$(CXX) $(LIBCXXFLAGS) -M gen_cf_gmp.cc|grep gmp.h` \"" >>gen_cf_gmp.sh
778        cat gen_cf_gmp.template >>gen_cf_gmp.sh
779        $(SHELL) gen_cf_gmp.sh
Note: See TracBrowser for help on using the repository browser.