]> Git Repo - binutils.git/blobdiff - gprof/Makefile.in
merge binutils and gdb sparc disassemblers
[binutils.git] / gprof / Makefile.in
index 8c6a127c3fd47ba8c01347ca735b3ce0c75828ba..ed148e7e0752c3b49674dd5c522c655351c94e34 100644 (file)
@@ -1,6 +1,6 @@
 #      @(#)Makefile    5.17 (Berkeley) 5/11/90
 
-srcdir         = .
+srcdir = .
 
 prefix         = /usr/local
 
@@ -12,51 +12,97 @@ tooldir = $(libdir)
 mandir         = $(prefix)/man
 man1dir = $(mandir)/man1
 
+infodir        = $(prefix)/info
 datadir = $(prefix)/lib
 
 INSTALL        = install -c
 INSTALL_PROGRAM = $(INSTALL)
 INSTALL_DATA   = $(INSTALL)
+MAKEINFO       = makeinfo
+TEX            = tex
+TEXINDEX       = texindex
+
+# this is the directory we look in to find Texinfo
+texidir                = $(srcdir)/../texinfo
 
 #### host and target dependent Makefile fragments come in here.
 ###
 
 PROG=  gprof
-SRCS=  gprof.c arcs.c dfn.c lookup.c ${MACHINE}.c hertz.c \
+SRCS=  gprof.c arcs.c dfn.c lookup.c $(MACHINE).c hertz.c \
        printgprof.c printlist.c
 LIBS = ../bfd/libbfd.a ../libiberty/libiberty.a
 
-OBJS=  blurbs.o gprof.o arcs.o dfn.o lookup.o ${MACHINE}.o hertz.o \
-       printgprof.o printlist.o
+OBJS=  gprof.o arcs.o dfn.o lookup.o $(MACHINE).o hertz.o \
+       printgprof.o printlist.o \
+       flat_bl.o bsd_callg_bl.o fsf_callg_bl.o
+
+# Files that can be generated, but should be included in distribution.
+DISTSTUFF = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
 
 CFLAGS=        
 .c.o:
-       $(CC) -c $(CFLAGS) -I$(srcdir) -I$(srcdir)/../include -DMACHINE_H=\"${MACHINE}.h\" ${TCFLAGS} ${HCFLAGS} $<
+       $(CC) -c $(CFLAGS) -I$(srcdir) -I$(srcdir)/../include -DMACHINE_H=\"$(MACHINE).h\" $(TCFLAGS) $(HCFLAGS) $<
 
-all:   ${PROG}
+all:   diststuff $(PROG)
 
-.PHONY: check info install-info
-check:
-info:
-install-info:
+.PHONY: check installcheck info install-info
+.SUFFIXES: .m
+
+.m.c:
+       awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \
+           FUNCTION=`(echo $*|sed -e 's/_bl//')`_blurb \
+           FILE=$*.m $(srcdir)/$*.m
+
+diststuff: $(DISTSTUFF)
+
+gprof.info: gprof.texi
+       $(MAKEINFO) -o gprof.info $(srcdir)/gprof.texi
 
-install: all
-       $(INSTALL_DATA) ${srcdir}/gprof.flat ${DESTDIR}$(datadir)
-       $(INSTALL_DATA) ${srcdir}/gprof.callg ${DESTDIR}$(datadir)
-#      $(INSTALL_DATA) $(srcdir)/gprof.1 $(man1dir)/gprof.1
-       $(INSTALL_PROGRAM) $(PROG) ${DESTDIR}$(bindir)
+gprof.dvi: gprof.texi
+       TEXINPUTS=${TEXIDIR}:$(srcdir):$$TEXINPUTS $(TEX) $(srcdir)/gprof.texi
+       $(TEXINDEX) gprof.??
+       TEXINPUTS=${TEXIDIR}:$(srcdir):$$TEXINPUTS $(TEX) $(srcdir)/gprof.texi
+
+info: gprof.info
+
+dvi: gprof.dvi
+
+check:
+installcheck:
+
+install-info: info
+       -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
+       if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
+       -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
+       for i in *.info* ; do \
+               $(INSTALL_DATA) $$i $(infodir)/$$i ; \
+       done
+
+install: all install-info
+       -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
+       if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
+       -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
+       -parent=`echo $(bindir)|sed -e 's@/[^/]*$$@@'`; \
+       if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
+       -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi
+       $(INSTALL_PROGRAM) $(PROG) $(bindir)/$(PROG)
+       $(INSTALL_DATA) $(srcdir)/gprof.1 $(man1dir)/gprof.1
 
 $(PROG):       $(OBJS)
        $(CC) $(CFLAGS) $(OBJS) -o $(PROG) $(LIBS)
 
-# Make blurbs.c from gprof.callg and gprof.flat
-blurbs.c: ${srcdir}/gprof.callg ${srcdir}/gprof.flat ${srcdir}/make-c-prog.awk
-       awk -f ${srcdir}/make-c-prog.awk > ./blurbs.c \
-               FUNCTION=flat_blurb  ${srcdir}/gprof.flat \
-               FUNCTION=callg_blurb ${srcdir}/gprof.callg \
-
-clean:
-       -rm -f $(OBJS) core gprof nohup.out
+mostlyclean:
+       -rm -f *.o core gprof nohup.out gprof.info* \
+       gprof.cps  gprof.fns  gprof.log  gprof.ps   gprof.tps\
+       gprof.aux  gprof.dvi  gprof.ky   gprof.pg   gprof.toc  gprof.vr\
+       gprof.cp   gprof.fn   gprof.kys  gprof.pgs  gprof.tp   gprof.vrs
+clean: mostlyclean
+       -rm -f gprof
+distclean: clean
+       -rm -f config.status Makefile
+realclean: distclean
+       -rm -f $(DISTSTUFF)
 
 Makefile : Makefile.in
        sh config.status
@@ -67,8 +113,10 @@ gprof.o: gprof.c
 arcs.o: arcs.c
 dfn.o: dfn.c
 lookup.o: lookup.c
-${MACHINE}.o: ${MACHINE}.c
+$(MACHINE).o: $(MACHINE).c
 hertz.o: hertz.c
 printgprof.o: printgprof.c
 printlist.o: printlist.c
-blurbs.o: blurbs.c
+flat_bl.o: flat_bl.c
+bsd_callg_bl.o: bsd_callg_bl.c
+fsf_callg_bl.o: fsf_callg_bl.c
This page took 0.025988 seconds and 4 git commands to generate.