1## Process this file with automake to produce Makefile.in -*-Makefile-*-
2AUTOMAKE_OPTIONS = foreign
3
4CLEANFILES = binary1 binary2 binary3 defaults.ini equipo2.tmp field2xy.tmp \
5soundfit.par temp.set fontfile.ps fontfile_latex.ps epslatex-inc.eps \
6epslatex-inc.pdf epslatex.aux epslatex.dvi epslatex.log epslatex.pdf \
7epslatex.ps epslatex.tex random.tmp stringvar.tmp fit.log fitmulti.dat
8
9BINARY_FILES = binary1 binary2 binary3
10
11SUBDIRS = $(PLUGIN_DIR)
12DIST_SUBDIRS = plugin
13
14DEMO = all.dem
15
16GNUPLOT = gnuplot
17
18all: $(BINARY_FILES)
19
20$(BINARY_FILES): ../src/bf_test
21	@echo Creating binary data files
22	@../src/bf_test
23
24check-prepare:
25
26check-local: check-noninteractive
27
28check-interactive: check-prepare $(BINARY_FILES)
29	@if test -z "$(GNUTERM)" ; then \
30	  ( bdir=`pwd` ; PATH=$$bdir/../src:$$PATH \
31	    FIT_LOG="" \
32	    GNUPLOT_DRIVER_DIR=$$bdir/../src \
33	    GNUPLOT_LIB=$(srcdir) $(GNUPLOT) $(DEMO) ); \
34	else \
35	  ( bdir=`pwd` ; PATH=$$bdir/../src:$$PATH \
36	    FIT_LOG="" \
37	    GNUPLOT_DRIVER_DIR=$$bdir/../src \
38	    GNUTERM="$(GNUTERM)" \
39	    GNUPLOT_LIB=$(srcdir) $(GNUPLOT) $(DEMO) ); \
40	fi
41
42check-noninteractive: check-prepare $(BINARY_FILES)
43	@if test -z "$(GNUTERM)" ; then \
44	  ( bdir=`pwd` ; PATH=$$bdir/../src:$$PATH \
45	    FIT_LOG="" \
46	    GNUPLOT_DRIVER_DIR=$$bdir/../src \
47	    GNUPLOT_LIB=$(srcdir) $(GNUPLOT) $(DEMO) </dev/null ); \
48	else \
49	  ( bdir=`pwd` ; PATH=$$bdir/../src:$$PATH\
50	    FIT_LOG="" \
51	    GNUPLOT_DRIVER_DIR=$$bdir/../src \
52	    GNUTERM="$(GNUTERM)" \
53	    GNUPLOT_LIB=$(srcdir) $(GNUPLOT) $(DEMO) </dev/null ); \
54	fi
55
56epslatex:
57	@if test -z "$(GNUTERM)" ; then \
58	  ( bdir=`pwd` ; PATH=$$bdir/../src:$$PATH \
59	    GNUPLOT_DRIVER_DIR=$$bdir/../src \
60	    GNUPLOT_LIB=$(srcdir) $(GNUPLOT) epslatex.dem ); \
61	else \
62	  ( bdir=`pwd` ; PATH=$$bdir/../src:$$PATH \
63	    GNUPLOT_DRIVER_DIR=$$bdir/../src \
64	    GNUTERM="$(GNUTERM)" \
65	    GNUPLOT_LIB=$(srcdir) $(GNUPLOT) epslatex.dem ); \
66	fi
67	latex epslatex
68	dvips epslatex
69
70##m4-files-begin
71##m4-files-end
72
73Makefile.am: Makefile.am.in
74	rm -f $@ $@t
75	sed -n '1,/^##m4-files-begin/p' Makefile.am.in > $@t
76	echo EXTRA_DIST = Makefile.am.in *.bin *.cfg *.cor *.dat *.dem *.edf \
77	  *.fnc *.inc *.pdb *.png *.r3d *.rgb sound.par sound2.par \
78	  start.par *.rot gnu-valley random-points gpdemos.tcl html | fmt | \
79	  (tr '\012' @; echo) | sed 's/@$$/%/;s/@/ \\@/g' | tr @% '\012 ' \
80	  >> $@t
81	sed -n '/^##m4-files-end/,$$p' $< >> $@t
82	echo if BUILD_PLUGIN >> $@t
83	echo    PLUGIN_DIR = plugin >> $@t
84	echo endif >> $@t
85	chmod og-w $@t
86	mv $@t $@
87
88