source: git/factory/GNUmakefile.in @ 547f64

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