source: git/factory/GNUmakefile.in @ c74d6a

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