source: git/factory/GNUmakefile.in @ 9c115e1

spielwiese
Last change on this file since 9c115e1 was 9c115e1, checked in by Hans Schoenemann <hannes@…>, 14 years ago
pow -> ipower, code cleanup git-svn-id: file:///usr/local/Singular/svn/trunk@12772 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.inc \
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_primes.h \
228                cf_primetab.h \
229                cf_random.h \
230                cf_reval.h \
231                cf_switches.h \
232                cf_util.h \
233                debug.h \
234                fac_berlekamp.h \
235                fac_cantzass.h \
236                fac_distrib.h \
237                fac_iterfor.h \
238                fac_multivar.h \
239                fac_sqrfree.h \
240                fac_univar.h \
241                fac_util.h \
242                fieldGCD.h \
243                ffops.h \
244                ffreval.h \
245                ftmpl_array.h \
246                ftmpl_factor.h \
247                ftmpl_functions.h \
248                ftmpl_list.h \
249                ftmpl_matrix.h \
250                gf_tabutil.h \
251                gfops.h \
252                gmpext.h \
253                imm.h \
254                int_cf.h \
255                int_int.h \
256                int_poly.h \
257                int_pp.h \
258                int_rat.h \
259                sm_sparsemod.h \
260                sm_util.h \
261                timing.h \
262                variable.h \
263                NTLconvert.h \
264                bifac.h \
265                bifacConfig.h \
266                lgs.h \
267                algext.h
268
269singfactoryincl := \
270                singext.h
271useiofactoryincl := \
272                parseutil.h
273distfactoryincl := \
274                $(basefactoryincl) \
275                $(singfactoryincl) \
276                $(useiofactoryincl)
277doxyincl :=     \
278                $(basefactoryincl) \
279                parseutil.h
280
281# memory manager source files
282basememmansrc := \
283                newdelete.cc
284newmemmansrc := \
285                mmalloc.c \
286                mmallocb.c \
287                mmallocs.c \
288                mmblock.c \
289                mmheap.c \
290                mminit.c \
291                mmspec.c \
292                mmutil.c
293oldmemmansrc := \
294                memutil.c
295distmemmansrc := \
296                $(basememmansrc) \
297                $(newmemmansrc) \
298                $(oldmemmansrc)
299
300# memory manager object files and dependencies
301memmanobj :=    $(memmansrc:.cc=.o)
302memmanobj :=    $(memmanobj:.c=.o)
303memmandep :=    $(memmansrc:.cc=.d)
304memmandep :=    $(memmandep:.c=.d)
305
306# memory manager header files
307newmemmanincl := \
308                mmprivate.h \
309                memman.h
310oldmemmanincl := \
311                memutil.h
312distmemmanincl := \
313                $(newmemmanincl) \
314                $(oldmemmanincl)
315
316# factory template files
317templatesrc :=  \
318                ftmpl_array.cc \
319                ftmpl_factor.cc \
320                ftmpl_functions.h \
321                ftmpl_list.cc \
322                ftmpl_matrix.cc
323templateincl := \
324                ftmpl_array.h \
325                ftmpl_factor.h \
326                ftmpl_list.h \
327                ftmpl_matrix.h
328
329# header templates
330hdrtemplsrc := \
331                factoryconf.template \
332                factory.template
333hdrtempldep :=  $(hdrtemplsrc:.template=.d)
334
335# FTE source files
336ftestsrc :=     \
337                ftest_io.cc \
338                ftest_util.cc \
339                ntl_util.cc
340
341# FTE header files
342ftestincl :=    \
343                ftest_io.h \
344                ftest_util.h \
345                ntl_util.h
346
347# FTE m4 source files (exported for `GNUmakefile' in `ftest/').
348# The variable `$(ftestm4develsrc)' may be already initialized
349# from the development `GNUmakefile'.
350ftestm4src :=   $(ftestm4develsrc) \
351                commonden.m4 \
352                degree.m4 \
353                deriv.m4 \
354                divides.m4 \
355                divrem.m4 \
356                extgcd.m4 \
357                factorize.m4 \
358                fbinops.m4 \
359                feval.m4 \
360                gcd.m4 \
361                gcd.ntl.m4 \
362                insert.m4 \
363                norm.m4 \
364                resultant.m4 \
365                revert.m4 \
366                sqrfree.m4 \
367                size.m4 \
368                totaldegree.m4
369export ftestm4src
370
371# other files from the FTE
372ftestdistfiles := \
373                ChangeLog \
374                GNUmakefile.in \
375                ftest_util.m4
376
377# FTE executables
378ftestexec :=    $(ftestm4src:.m4=)
379
380# all the C/C++ source files in the distribution
381distsrc :=      \
382                $(distfactorysrc) $(distmemmansrc) \
383                $(addprefix templates/,$(templatesrc)) \
384                $(addprefix ftest/,$(ftestsrc)) \
385                readcf.cc ftmpl_inst.cc \
386                gengftables.cc gengftables-conway.cc test_install.cc
387
388# all the C/C++ include files in the distribution
389distincl :=     \
390                $(distfactoryincl) $(distmemmanincl) \
391                $(addprefix templates/,$(templateincl)) \
392                $(addprefix ftest/,$(ftestincl))
393
394# all files for the Windows NT environment
395distntfiles :=  \
396                config.h nt.mak \
397                factory.h factoryconf.h \
398                INSTALL.nt
399
400# all files in the distribution
401distfiles :=    \
402                $(distsrc) $(distincl) $(hdrtemplsrc) \
403                $(addprefix ftest/,$(ftestm4src)) \
404                $(addprefix ftest/,$(ftestdistfiles)) \
405                GNUmakefile.in configure.in config.h.in configure \
406                ChangeLog README NEWS INSTALL \
407                factory.cfg gen_cf_gmp.template \
408                $(addprefix winnt/,$(distntfiles)) \
409                examples/GNUmakefile examples/application.cc \
410                examples/factorize.cc examples/gcd.cc \
411                bin/folding.el bin/fold-docu.el \
412                bin/install-sh bin/mkinstalldirs \
413                bin/makeheader bin/gen-readcf
414
415#
416# - phony targets.
417#
418.PHONY:         all cf mem dist depend \
419                clean mostlyclean distclean maintainer-clean \
420                install installcf installmem installgftables installtest \
421                uninstall uninstallcf uninstallmem uninstallgftables \
422                ftestall ftestclean ftestdistclean \
423                doxy doxyclean
424
425# we make these targets phony to make sure that they are
426# up to date when a new distribution is built
427.PHONY:         $(srcdir)/winnt/factory.h $(srcdir)/winnt/factoryconf.h
428
429#
430# - pattern rules.
431#
432
433# how to create library objets
434%.o: %.cc config.h
435        $(CXX) -c $< $(LIBCXXFLAGS) -o $@
436%.o: %.c config.h
437        $(CC) -c $< $(LIBCFLAGS) -o $@
438# the debug version:
439%.og: %.cc config.h
440        $(CXX) -g -c $< $(LIBCGGFLAGS) -o $@
441# the profiling version:
442%.op: %.cc config.h
443        $(CXX) -O -pg -c $< $(LIBCGGFLAGS) -o $@
444
445# how to create dependency files.  To avoid broken dependency files
446# (which in turn break this GNUmakefile) we first generate them in
447# a temporary file which we then move to the destination file.
448%.d: %.cc factoryconf.h config.h
449        echo $@ "\\" > $@tmp
450        $(CXX) -MM $< $(DEPCXXFLAGS) >> $@tmp
451        mv $@tmp $@
452%.d: %.c factoryconf.h config.h
453        echo $@ "\\" > $@tmp
454        $(CXX) -MM $< $(DEPCXXFLAGS) >> $@tmp
455        mv $@tmp $@
456%.d: %.template
457        echo $@ $(@:.d=.h) : "\\" > $@tmp
458        sed -n '/^\/\*MAKEHEADER/!d; n; s/^#include "//; s/"//; p;' $< | tr '\012' ' ' >> $@tmp
459        echo >> $@tmp
460        mv $@tmp $@
461
462# how to create header files from header templates
463%.h: %.template
464        $(MAKEHEADER) $(MAKEHEADERFLAGS) $< $@
465
466#
467# - building factory.
468#
469all:            $(alltargets)
470
471cf:             factoryconf.h factory.h $(libfactory) libsingcf_g.a
472
473mem:            libcfmem.a
474
475#
476# - explicit targets.
477#
478$(libfactory):  $(factoryobj)
479                $(AR) $(ARFLAGS) $@ $^
480                $(RANLIB) $@
481
482libsingcf_g.a:  $(factorygobj)
483                $(AR) $(ARFLAGS) $@ $^
484                $(RANLIB) $@
485
486libsingcf_p.a:  $(factorypobj)
487                $(AR) $(ARFLAGS) $@ $^
488                $(RANLIB) $@
489
490libcfmem.a:     $(memmanobj)
491                $(AR) $(ARFLAGS) $@ $^
492                $(RANLIB) $@
493
494ftmpl_inst.o:   ftmpl_inst.cc factoryconf.h factory.h \
495                $(addprefix templates/,$(templatesrc)) \
496                $(addprefix templates/,$(templateincl))
497                $(CXX) -c $< $(TMPLCXXFLAGS) -o $@
498
499# note that this is a non-source file which is distributed!
500$(srcdir)/readcf.cc: readcf.y
501                @./bin/gen-readcf "${BISON}"
502
503# note that these are non-source file which are distributed!
504# We do not specify any dependencies except the most important ones.
505$(srcdir)/winnt/factory.h: factory.template
506                $(MAKEHEADER) $(MAKEHEADERFLAGS) $< $@
507$(srcdir)/winnt/factoryconf.h: factoryconf.template winnt/config.h
508                $(MAKEHEADER) -I$(srcdir)/winnt $(MAKEHEADERFLAGS) $< $@
509
510# specify dependency in case user does not 'make depend'
511factoryconf.h:  config.h cf_gmp.h
512
513TAGS:
514                etags $(addprefix $(srcdir)/, $(distsrc) $(distincl))
515
516# check configuration before building executables
517conftest:
518                @if test -z "$(filter mem,$(alltargets))" \
519                  || test -z "$(filter readcf.y,$(factorysrc))" \
520                  || test -n "$(filter singext.cc,$(factorysrc))"; then \
521                  echo "To make this target you have to configure"; \
522                  echo "\`--without-Singular --with-memman --enable-streamio'."; \
523                  exit 1; \
524                fi
525
526#
527# - doxygen.
528#
529
530# files and environment variables to export for doxygen
531doxyfiles :=    $(addprefix $(srcdir)/,$(doxysrc) $(doxyincl))
532
533export version srcdir doxyfiles
534
535# doxygen targets
536doxy:           factory.cfg $(doxysrc) $(doxyincl)
537                doxygen $<
538
539doxyclean:
540                rm -rf doxygen
541
542#
543# - Factory Test Environment.
544#
545$(ftestexec):   conftest factoryconf.h factory.h libcf.a libcfmem.a ftmpl_inst.o
546                cd ftest && $(MAKE) $@
547                @if test -r "$@"; then \
548                  :; \
549                else \
550                  echo "$(LN_S) ftest/$@ $@"; \
551                  $(LN_S) ftest/$@ $@; \
552                fi
553
554ftestall:       $(ftestexec)
555
556ftestclean:
557                -cd ftest && $(MAKE) clean
558
559ftestdistclean:
560                -cd ftest && $(MAKE) distclean
561                -rmdir ftest
562
563#
564# - GF(q) table generation.
565#
566
567# these are not all dependencies, but the most important ones
568gengftables.o:  gengftables-conway.cc conftest factory.h gf_tabutil.h
569                $(CXX) -c $< $(TESTCXXFLAGS) -o $@
570
571gengftables:    gengftables.o libcf.a libcfmem.a ftmpl_inst.o
572                $(CXX) $^ $(TESTLDFLAGS) -o $@
573
574gftables:       gengftables
575                @echo "This command will take quite a long time to execute;"
576                @echo "maybe you want to get the tables directly via ftp (see"
577                @echo "the INSTALL file)."
578                $(MKINSTALLDIRS) gftables
579                ./gengftables
580
581#
582# - installation test program.
583#
584
585# compile installation test program.  do not look up
586# header files in current directory or in $(srcdir), but use
587# the header files from the directory where they should be
588# after installation.
589test_install.o: test_install.cc
590                $(CXX) -c $< $(TESTCXXFLAGS) -I- -I$(includedir) -o $@
591
592# the same we do for ftmpl_inst.o which for this reason is named
593# iftmpl_inst.o
594iftmpl_inst.o:
595                $(CXX) -c $(templatedir)/ftmpl_inst.cc $(TMPLCXXFLAGS) -I- -I$(includedir) -o $@
596
597# link installation test program
598test_install:   test_install.o iftmpl_inst.o
599                $(CXX) $^ -L$(libdir) -lcf -lcfmem $(TESTLDFLAGS) -o $@
600
601installtest:    test_install
602                @-if ./test_install; then \
603                  echo "Installation seems ok."; \
604                else \
605                  echo "Please check path of your GF(q) tables in config.h."; \
606                fi
607
608#
609# - install targets.
610#
611install:        $(installtargets)
612
613install_all:    install libsingcf_p.a
614                -$(INSTALL_DATA) libsingcf_p.a $(libdir)/libsingcf_p.a
615
616install-nolns: install
617
618installcf:      cf
619                $(MKINSTALLDIRS) $(libdir)
620                $(MKINSTALLDIRS) $(includedir)
621                $(MKINSTALLDIRS) $(templatedir)
622                $(INSTALL_DATA) $(libfactory) $(libdir)/$(libfactory)
623                -$(INSTALL_DATA) libsingcf_g.a $(libdir)/libsingcf_g.a
624                $(INSTALL_DATA) factory.h $(includedir)/factory.h
625                $(INSTALL_DATA) cf_gmp.h $(includedir)/cf_gmp.h
626                $(INSTALL_DATA) factoryconf.h $(includedir)/factoryconf.h
627                $(INSTALL_DATA) $(srcdir)/ftmpl_inst.cc $(templatedir)/ftmpl_inst.cc
628                for file in $(templatesrc) $(templateincl); do \
629                  $(INSTALL_DATA) $(srcdir)/templates/$$file $(templatedir)/$$file; \
630                done
631# we run `ranlib' another time for SUN machines
632                $(RANLIB) $(libdir)/$(libfactory)
633
634installmem:     mem
635                $(MKINSTALLDIRS) $(libdir)
636                $(INSTALL_DATA) libcfmem.a $(libdir)/libcfmem.a
637# once again: another run for SUN
638                $(RANLIB) $(libdir)/libcfmem.a
639
640# to a pity, this cannot be done automatically ...
641installgftables:
642                @echo "Copying GF(q) tables ..."
643                @if test -d gftables; then \
644                  $(MKINSTALLDIRS) $(gftabledir); \
645                  for file in gftables/gftable.*.*; do \
646                    $(INSTALL_DATA) $$file $(gftabledir); \
647                  done \
648                elif test -d "$(srcdir)"/gftables; then \
649                  $(MKINSTALLDIRS) $(gftabledir); \
650                  for file in "$(srcdir)"/gftables/gftable.*.*; do \
651                    $(INSTALL_DATA) $$file $(gftabledir); \
652                  done \
653                else \
654                  echo "Run 'make gftables' before installing them"; \
655                  exit 1; \
656                fi
657
658#
659# - uninstall targets.
660#
661uninstall:      $(uninstalltargets)
662
663uninstallcf:
664                -for file in $(templatesrc) $(templateincl); do \
665                  rm -f $(templatedir)/$$file; \
666                done
667                -rm -f $(templatedir)/ftmpl_inst.cc
668                -rm -f $(includedir)/factoryconf.h
669                -rm -f $(includedir)/factory.h
670                -rm -f $(libdir)/$(libfactory)
671                -rm -f $(libdir)/libsingcf_g.a
672                -rm -f $(libdir)/libsingcf_p.a
673                -rmdir $(templatedir)
674                -rmdir $(includedir)
675                -rmdir $(libdir)
676
677uninstallmem:
678                -rm -f $(libdir)/libcfmem.a
679                -rmdir $(libdir)
680
681uninstallgftables:
682                -rm -f $(gftabledir)/gftable.*.*
683                -rmdir $(gftabledir)
684
685#
686# - building a distribution.
687#
688dist:           $(srcdir)/readcf.cc $(srcdir)/configure \
689                $(srcdir)/winnt/factory.h $(srcdir)/winnt/factoryconf.h
690                rm -f $(distname).tgz
691                rm -rf $(distname)
692                $(MKINSTALLDIRS) $(distname)/bin
693                $(MKINSTALLDIRS) $(distname)/examples
694                $(MKINSTALLDIRS) $(distname)/ftest
695                $(MKINSTALLDIRS) $(distname)/winnt
696                $(MKINSTALLDIRS) $(distname)/templates
697                @echo "Copying files to distribution directory ..."
698                @for file in $(distfiles); do \
699                  ln $(srcdir)/$$file $(distname)/$$file; \
700                done
701                tar cf $(distname).tar $(distname)
702                gzip $(distname).tar
703                mv $(distname).tar.gz $(distname).tgz
704
705#
706# - cleaning up.
707#
708clean:          ftestclean
709                -rm -f $(libfactory) libcfmem.a libsingcf_g.a libsingcf_p.a \
710                  $(ftestexec) gengftables test_install \
711                  factoryconf.h factory.h *.o *.og *.op *.d *.dtmp cf_gmp.h
712
713# remove gftables only if we built them
714mostlyclean:    clean doxyclean
715                -rm -f TAGS
716                -if test ! -f gftables/README; then \
717                  rm -rf gftables; \
718                fi
719
720distclean:      ftestdistclean mostlyclean
721                -rm -f $(distname).tgz GNUmakefile stamp-h \
722                  config.cache config.log config.status config.h
723                -rm -rf $(distname)
724
725maintainer-clean: distclean
726                @echo "This command is intended for maintainers to use;"
727                @echo "it deletes files that require bison to rebuild."
728                -rm -f $(srcdir)/readcf.cc
729
730#
731# - dependencies.
732#
733# Do not generate them automatically if there are not any
734# dependencies at all.  this trick saves some time when you do
735# not want to compile but do some maintenance which do not
736# require the dependencies.  say 'make depend' to create the
737# dependencies explicitly.
738#
739depend:         $(factorydep) $(memmandep) $(hdrtempldep)
740
741ifneq ($(wildcard *.d),)
742  include $(factorydep) $(memmandep) $(hdrtempldep)
743endif
744
745#
746# - configure stuff.
747#
748$(srcdir)/configure: configure.in
749                @echo "WARNING: You need to rerun autoconf. I am proceeding, for now."
750                touch configure
751
752#               -cd $(srcdir) && autoconf
753
754# seems gmake needs at least a trivial command.  otherwise all
755# files which depend on config.h will be remade even if congig.h
756# did not change.
757config.h:       stamp-h
758                @:
759
760stamp-h:        config.h.in config.status
761                CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
762                echo timestamp > stamp-h
763
764GNUmakefile:    GNUmakefile.in config.status
765                CONFIG_FILES=GNUmakefile CONFIG_HEADERS= ./config.status
766
767ftest/GNUmakefile: ftest/GNUmakefile.in config.status
768                CONFIG_FILES=ftest/GNUmakefile CONFIG_HEADERS= ./config.status
769
770config.status:  configure
771                ./config.status --recheck
772
773# create cf_gmp.h
774cf_gmp.h: GNUmakefile gen_cf_gmp.template
775        echo "#!/bin/sh" >gen_cf_gmp.sh
776        echo "GMP_H_T=\"`$(CXX) $(LIBCXXFLAGS) -M gen_cf_gmp.cc|grep gmp.h` \"" >>gen_cf_gmp.sh
777        cat gen_cf_gmp.template >>gen_cf_gmp.sh
778        $(SHELL) gen_cf_gmp.sh
Note: See TracBrowser for help on using the repository browser.