fio2gnuplot: Managing temporary files in a better way
[fio.git] / Makefile
index 57f3f82ea35fe1430ce9706c546dc506723713d6..8494b27e99cc92ab8d03a74ce4c072cc97a97254 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,8 +6,10 @@ config-host-mak: configure
        @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
 else
 config-host.mak:
+ifneq ($(MAKECMDGOALS),clean)
        @echo "Running configure for you..."
        @./configure
+endif
 all:
 include config-host.mak
 endif
@@ -18,7 +20,7 @@ OPTFLAGS= -O3 -g -ffast-math
 CFLAGS = -std=gnu99 -Wwrite-strings -Wall -Wdeclaration-after-statement $(OPTFLAGS) $(EXTFLAGS) $(BUILD_CFLAGS)
 LIBS   += -lm $(EXTLIBS)
 PROGS  = fio
-SCRIPTS = fio_generate_plots
+SCRIPTS = tools/fio_generate_plots tools/plot/fio2gnuplot.py tools/genfio
 
 ifdef CONFIG_GFIO
   PROGS += gfio
@@ -187,8 +189,10 @@ bindir = $(prefix)/bin
 
 ifeq ($(CONFIG_TARGET_OS), Darwin)
 mandir = /usr/share/man
+sharedir = /usr/share/fio
 else
 mandir = $(prefix)/man
+sharedir = $(prefix)/share/fio
 endif
 
 all: $(PROGS) $(SCRIPTS) FORCE
@@ -276,4 +280,6 @@ install: $(PROGS) $(SCRIPTS) FORCE
        $(INSTALL) $(PROGS) $(SCRIPTS) $(DESTDIR)$(bindir)
        $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
        $(INSTALL) -m 644 fio.1 $(DESTDIR)$(mandir)/man1
-       $(INSTALL) -m 644 fio_generate_plots.1 $(DESTDIR)$(mandir)/man1
+       $(INSTALL) -m 644 tools/fio_generate_plots.1 $(DESTDIR)$(mandir)/man1
+       $(INSTALL) -m 755 -d $(DESTDIR)$(sharedir)
+       $(INSTALL) -m 644 tools/plot/*gpm $(DESTDIR)$(sharedir)/