]> granicus.if.org Git - graphviz/commitdiff
Mark Makefiles that don't generate files as .PHONY
authorMark Hansen <mark@markhansen.co.nz>
Sat, 16 May 2020 05:42:58 +0000 (15:42 +1000)
committerMark Hansen <mark@markhansen.co.nz>
Sat, 16 May 2020 05:47:29 +0000 (15:47 +1000)
See
https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html.

These targets aren't the name of a file, they're just a name for some
behaviour to run.

Marking them as .PHONY ensures that even if a file called 'clean' or
'distclean' or 'all' or 'install' exists in the directory, the code will
still be run.

26 files changed:
contrib/pangotest/Makefile
doc/docbook/Makefile
doc/dotguide/Makefile
doc/dotty/Makefile
doc/dotty/figs/Makefile
doc/infosrc/Makefile
doc/lefty/Makefile
doc/lefty/figs/Makefile
doc/libgraph/Makefile
doc/libguide/Makefile
doc/neato/Makefile
doc/smyrna/Makefile
dot.demo/Makefile
dot.demo/Makefile.builtins
dot.demo/Makefile.python_wrapper
dot.demo/Makefile.python_wrapper_builtins
lib/inkpot/test/Makefile
macosx/build/Makefile.lion
macosx/build/Makefile.mountainlion
macosx/build/Makefile.snowleopard
macosx/prebuild/Makefile.leopard
macosx/prebuild/Makefile.lion
macosx/prebuild/Makefile.snowleopard
macosx/prebuild/Makefile.tiger
rtest2/Makefile
windows/prebuild/Makefile

index 838581b44f50e31b986b0b757cae578c6f66f0af..57a2faa959527186463c0d6fe0a4d549329fadeb 100644 (file)
@@ -3,8 +3,10 @@ LDFLAGS = `pkg-config --libs pangocairo`
 
 pangotest: pangotest.c
 
+.PHONY: test
 test: pangotest
        ./pangotest Ay Times 64 >`uname -s`.png
 
+.PHONY: clean
 clean:
        rm -f pangotest *.png
index 7f976a96a439033e98ca827cae76191442e6658b..8e077f85fb43b1dc4a258275cbfcffca7d82f594 100644 (file)
@@ -4,6 +4,7 @@ SRCS = \
        src/graphviz_plugins.xml \
        src/graphviz_scripting.xml
 
+.PHONY: all
 all: html pdf
 
 dvi fo javahelp man pdf ps txt: $(SRCS)
@@ -14,5 +15,6 @@ xhtml xhtml-nochunks html html-nochunks htmlhelp: $(SRCS)
        xmlto $@ -o $@ src/book.xml
        cp -rp src/imgs $@/
 
+.PHONY: clean
 clean:
        rm -rf xhtml xhtml-nochunks html html-nochunks htmlhelp book.*
index 1a0af64267df2fd33389549d54990be369484848..2632a3a52c6a7586e4003f8bee894ebba622c2a9 100644 (file)
@@ -47,6 +47,7 @@ dotguide.bbl : dotguide.tex ../dotguide/graphdraw.bib dotguide.aux
 dotguide.aux : dotguide.tex $(GRAPHFILES)
        pdflatex dotguide
 
+.PHONY: clean
 clean: 
        rm -rf *.ps *.pdf *.log  dotguide.aux dotguide.blg dotguide.bbl
 
index 2d38af08bbf6ea62c837dc66b0d1905095b1a452..b7b4947c27f05fece008fe3fd6e9c25bf871e49f 100644 (file)
@@ -12,7 +12,9 @@ dotty.bbl:
        bibtex dotty
        rm dotty.dvi
 
+.PHONY: all
 all: dotty.bbl dotty.dvi
 
+.PHONY: clean
 clean:
        rm -f *.aux *.log *.bbl *.blg *.ps *.dvi
index f84022046e364e796be05d87e6f7c9f32dd37921..e6bd99ec6bd1da9bd590b3050dc7c772c1ee1b67 100644 (file)
@@ -15,7 +15,9 @@
 
 PSS = d1.ps d2.ps d3.ps d4.ps d5.ps d6.ps d7.ps d8.ps dotty.ps fa1.ps fa2.ps ldbx.ps
 
+.PHONY: all
 all: $(PSS)
 
+.PHONY: clean
 clean:
        rm -rf *.ps
index bd5a87159f1c60b14c3290952f462f3605109c9a..0925d3f9c8e8b1da7c3a7a95488fa578bcd13eb0 100644 (file)
@@ -102,8 +102,10 @@ INSTALL_FILES = $(HTML) $(DOTS) $(SGIF) $(AGIF) $(A2GIF) $(MGIF) $(XGIF) $(MJPG)
 .gv.png :
        dot -Tpng -o $@ $<
 
+.PHONY: all
 all : $(HTML) $(GIF) $(MPNG) $(MJPG)
 
+.PHONY: install
 install : all
        $(INSTALL) $(INSTALL_FILES) $(INSTALL_DIR)
 
@@ -208,9 +210,11 @@ $(TAPERPNG) : mktapers.sh
 $(SPLINEPNG) : mksplines.sh
        ./mksplines.sh $@
 
+.PHONY: clean
 clean :
        rm -f mklang sdlshapes.ps sdlshapes.ppm html.html
 
+.PHONY: distclean
 distclean : clean
        rm -f attrs.html colors.html output.html shapes.html lang.html arrows.html
        rm -f $(A2GIF) $(AGIF) $(SGIF) $(MJPG) $(MGIF) $(MPNG) shapes
@@ -226,4 +230,3 @@ EXTRA_DIST = $(XGIF) mklang.y mkarrows.sh mkattrs.sh mkshapes.sh mkstyles.sh mkt
              colorlist.dot html1.dot html4.dot round.dot constraint.dot \
              html2.dot mrecord.dot sdlshapes.dot fill.dot html3.dot record.dot \
              attrs types X11 outputs eqn.gif plugins.gv
-
index 9aaef1524279dcf2c671393acbebdd6c6a584076..5f59b348d988bb17bb6974e570f178517765d7d7 100644 (file)
@@ -7,6 +7,7 @@
 %.ps : %.dot
        dot -Tps $< -o $@
 
+.PHONY: all
 all: lefty.bbl lefty.dvi
 
 lefty.bbl:
@@ -14,5 +15,6 @@ lefty.bbl:
        bibtex lefty
        rm lefty.dvi
 
+.PHONY: clean
 clean:
        rm -f *.aux *.log *.bbl *.blg *.ps *.dvi
index ed068ebc09680750971938186b209411cbcdd8d8..74abaa2dc61e06c9e19cee2f46feafba7a0d566c 100644 (file)
@@ -18,7 +18,9 @@
 
 PSS = fig2tpa.ps fig2tpb.ps figboxinitial.ps figboxfinal.ps figfractalonea.ps figfractaloneb.ps figfractalmva.ps figfractalmvb.ps figfractaltracea.ps figfractaltraceb.ps figfractaltracec.ps figradixtree.ps figbigtree.ps figtria.ps figtrib.ps figdag.ps lefty.ps
 
+.PHONY: all
 all: $(PSS)
 
+.PHONY: clean
 clean:
        rm -rf *.ps
index 712d948383c6acd005d49bd792187dbc8492fbcb..94fe3c24814d2952fdbdb9278c0622d46cc99d29 100644 (file)
@@ -2,6 +2,7 @@ TEX=latex
 PTEX=pdflatex
 DVI=dvips
 
+.PHONY: all
 all : Agraph.pdf
 
 %.pdf : %.dot
@@ -26,6 +27,7 @@ agmemread.tex : agmemread.c
 Agraph.aux : Agraph.tex
        $(TEX) Agraph
 
+.PHONY: clean
 clean: 
        rm -rf *.bbl *.aux *.dvi *.ps *.pdf *.log *.toc *.blg
 
index 6971e317b7da46d9eb16eb64f4dbb823b24655b0..39f37ecd508570ff9eeacfdafccb0aa7b35e1496 100644 (file)
@@ -2,6 +2,7 @@ TEX=latex
 PTEX=pdflatex
 DVI=dvips
 
+.PHONY: all
 all : libguide.pdf
 
 %.pdf : %.dot
@@ -32,6 +33,7 @@ libguide.bbl : libguide.tex graphdraw.bib libguide.aux
 libguide.aux : libguide.tex
        $(TEX) libguide
 
+.PHONY: clean
 clean: 
        rm -rf *.bbl *.aux *.dvi *.ps *.pdf *.log *.toc *.blg
 
index 4ec0a866a639823a4179e3300b0a4e02a6d9188c..c06a954e1487696068c2ca96a31fb84f8cacfd98 100644 (file)
@@ -24,5 +24,6 @@ neato.bbl : neato.tex ../dotguide/graphdraw.bib neato.aux
 neato.aux : neato.tex $(GRAPHFILES)
        pdflatex neato
 
+.PHONY: clean
 clean: 
        rm -rf *.ps *.pdf *.log 
index 4253b6318a3a7397a25f43ba2749d406d4dd4844..f2b5817adc36ab6da7648a71781d154be249a0aa 100644 (file)
@@ -34,5 +34,6 @@ smyrna.bbl : smyrna.tex ../dotguide/graphdraw.bib smyrna.aux
 smyrna.aux : smyrna.tex $(GRAPHFILES)
        pdflatex smyrna
 
+.PHONY: clean
 clean: 
        rm -rf *.pdf *.log *.aux *.bbl *.blg *.log *.toc
index 32520db09bc42a300cec8c96f24a3e10670f7545..da945f05c1de5e658c5f240399bb0214774ed01d 100644 (file)
@@ -1,6 +1,7 @@
 CFLAGS=`pkg-config libgvc --cflags` -Wall -g -O2
 LDFLAGS=`pkg-config libgvc --libs`
 
+.PHONY: all
 all: dot demo simple example neatopack
 
 dot: dot.o
@@ -9,5 +10,6 @@ simple: simple.o
 example: example.o
 neatopack: neatopack.o
 
+.PHONY: clean
 clean:
        rm -rf *.o dot demo simple example neatopack *.png
index 1aa3dfbcdbb70466dd6d691943f5e2f4f8de3089..565cfe736169e1a2e1a9123288dcdc9ca2160ce3 100644 (file)
@@ -1,3 +1,4 @@
+.PHONY: all
 all: dot demo simple example
 
 ################################################
@@ -22,5 +23,6 @@ demo: demo.o builtins.o
 simple: simple.o builtins.o
 example: example.o builtins.o
 
+.PHONY: clean
 clean:
        rm -rf *.o dot demo simple example *.png $(EXTRACLEAN)
index 66e146a697942119b6e48c5d0a3be3e6cdf85b5e..78abaaffafe49d738b77287593fcf8ab76ca65ec 100644 (file)
@@ -1,3 +1,4 @@
+.PHONY: all
 all: gv_test.png
 
 ################################################
@@ -31,5 +32,6 @@ _gv.so: gv.o gv_python.o
 gv_python.cpp gv.py: gv.i
        swig -c++ -python -o gv_python.cpp gv.i
 
+.PHONY: clean
 clean:
        rm -f gv.py gv_python.cpp _gv.so *.o gv_test.png $(EXTRACLEAN)
index d5b8c8998b751b0c53a559571011300006cbda48..0e178743a1af7927fc48000893bda0ddb604d26b 100644 (file)
@@ -1,3 +1,4 @@
+.PHONY: all
 all: gv_test.png
 
 ################################################
@@ -35,5 +36,6 @@ _gv.so: gv.o gv_python.o builtins.o
 gv_python.cpp gv.py: gv.i
        swig -c++ -python -o gv_python.cpp gv.i
 
+.PHONY: clean
 clean:
        rm -f gv.py gv_python.cpp _gv.so *.o gv_test.png $(EXTRACLEAN)
index e76535e64e4dfa80a073daa2005b5c313a04721d..251e65047069c077bbf5d907a9ab3740297fa06e 100644 (file)
@@ -32,6 +32,7 @@ inkpot_xlate.c:
 inkpot_xlate.h:
        ln -s ../inkpot_xlate.h
 
+.PHONY: clean
 clean:
        rm -rf *.o inkpot inkpot.[ch] inkpot_scheme.[ch] \
                inkpot_value.[ch] inkpot_xlate.[ch]
index e76fbc9b88773e9cee0e292b9e0d3c811af499ab..72ca1a5405399af5f623d8dfb79e15ef6d96859a 100644 (file)
@@ -73,8 +73,10 @@ $(GV_DIR)/Makefile: $(GV_DIR)/configure
 
 
 
+.PHONY: clean
 clean:
        $(MAKE) -C $(GV_DIR) clean
 
+.PHONY: distclean
 distclean:
        $(MAKE) -C $(GV_DIR) distclean
index 7095e1505a940d8325ac2e3e1e3cbd6368c88e5b..b89ae22cb344ebbddb98039ebad20835cf7b4796 100644 (file)
@@ -71,8 +71,10 @@ $(GV_DIR)/Makefile: $(GV_DIR)/configure
        @echo
        cd $(GV_DIR) && ./configure --enable-swig=no --disable-dependency-tracking --with-ipsepcola --with-quartz --with-smyrna=no --disable-perl --with-extra-includedir="$(PREFIX)/include" --with-extra-libdir="$(PREFIX)/lib" CFLAGS="-O2 $(ARCH)" CXXFLAGS="-O2 $(ARCH)" OBJCFLAGS="-O2 $(ARCH)" LDFLAGS="$(ARCH) -Wl,-dead_strip" GDLIB_CONFIG="$(PREFIX)/bin/gdlib-config" PKG_CONFIG="$(PREFIX)/bin/pkg-config" PKG_CONFIG_PATH="$(PREFIX)/lib/pkgconfig:/usr/X11/lib/pkgconfig"
 
+.PHONY: clean
 clean:
        $(MAKE) -C $(GV_DIR) clean
 
+.PHONY: distclean
 distclean:
        $(MAKE) -C $(GV_DIR) distclean
index 2b412267392e57f7dafeed6497ed13ef4e75239e..a3b0d9e5bb3ef685075c348dc610d0918884ee54 100644 (file)
@@ -71,8 +71,10 @@ $(GV_DIR)/Makefile: $(GV_DIR)/configure
        @echo
        cd $(GV_DIR) && ./configure --enable-swig=no --disable-dependency-tracking --with-ipsepcola --with-quartz --with-smyrna=no --disable-perl --with-extra-includedir="$(PREFIX)/include" --with-extra-libdir="$(PREFIX)/lib" CFLAGS="-O2 $(ARCH)" CXXFLAGS="-O2 $(ARCH)" OBJCFLAGS="-O2 $(ARCH)" LDFLAGS="$(ARCH) -Wl,-dead_strip" GDLIB_CONFIG="$(PREFIX)/bin/gdlib-config" PKG_CONFIG="$(PREFIX)/bin/pkg-config" PKG_CONFIG_PATH="$(PREFIX)/lib/pkgconfig:/usr/X11/lib/pkgconfig"
 
+.PHONY: clean
 clean:
        $(MAKE) -C $(GV_DIR) clean
 
+.PHONY: distclean
 distclean:
        $(MAKE) -C $(GV_DIR) distclean
index 2799fef570f608ec5ec0eb7ec1330b93e30ff235..d7fed854e5afa87f74c00f41f98679bb877017a5 100644 (file)
@@ -94,6 +94,7 @@ uninstall:
        $(MAKE) -C $(FREETYPE_DIR) uninstall
        $(MAKE) -C $(PKGCONFIG_DIR) uninstall
        
+.PHONY: clean
 clean:
        $(MAKE) -C $(JPEG_DIR) clean
        $(MAKE) -C $(TIFF_DIR) clean
@@ -111,6 +112,7 @@ clean:
        $(MAKE) -C $(FREETYPE_DIR) clean
        $(MAKE) -C $(PKGCONFIG_DIR) clean
        
+.PHONY: distclean
 distclean:
        $(MAKE) -C $(JPEG_DIR) distclean
        $(MAKE) -C $(TIFF_DIR) distclean
index 16ca7bc2a176a2b17447d67a532dbec627da848f..78345d5e8365e40940b42f7061cee3375195e8ef 100644 (file)
@@ -93,6 +93,7 @@ uninstall:
        $(MAKE) -C $(FREETYPE_DIR) uninstall
        $(MAKE) -C $(PKGCONFIG_DIR) uninstall
        
+.PHONY: clean
 clean:
        $(MAKE) -C $(JPEG_DIR) clean
        $(MAKE) -C $(TIFF_DIR) clean
@@ -110,6 +111,7 @@ clean:
        $(MAKE) -C $(FREETYPE_DIR) clean
        $(MAKE) -C $(PKGCONFIG_DIR) clean
        
+.PHONY: clean
 distclean:
        $(MAKE) -C $(JPEG_DIR) distclean
        $(MAKE) -C $(TIFF_DIR) distclean
index 5ec5c15fb23e82d04ef0713775ab4c738a801fe2..d3457cf0b810e024335d30eede604a85342269be 100644 (file)
@@ -95,6 +95,7 @@ uninstall:
        $(MAKE) -C $(FREETYPE_DIR) uninstall
        $(MAKE) -C $(PKGCONFIG_DIR) uninstall
        
+.PHONY: clean
 clean:
        $(MAKE) -C $(JPEG_DIR) clean
        $(MAKE) -C $(TIFF_DIR) clean
@@ -112,6 +113,7 @@ clean:
        $(MAKE) -C $(FREETYPE_DIR) clean
        $(MAKE) -C $(PKGCONFIG_DIR) clean
        
+.PHONY: distclean
 distclean:
        $(MAKE) -C $(JPEG_DIR) distclean
        $(MAKE) -C $(TIFF_DIR) distclean
index b3c7ca480e86d5513ae2e9e2040f13fc00c180fe..84d31b327d6ac75a0eebdfc5243cfbf2838a9f40 100644 (file)
@@ -76,6 +76,7 @@ uninstall:
        $(MAKE) -C $(PKGCONFIG_DIR) uninstall
        $(MAKE) -C $(LIBXML2_DIR) uninstall
        
+.PHONY: clean
 clean:
        $(MAKE) -C $(PANGO_DIR) clean
        $(MAKE) -C $(GLIB_DIR) clean
@@ -91,6 +92,7 @@ clean:
        $(MAKE) -C $(PKGCONFIG_DIR) clean
        $(MAKE) -C $(LIBXML2_DIR) clean
        
+.PHONY: distclean
 distclean:
        $(MAKE) -C $(PANGO_DIR) distclean
        $(MAKE) -C $(GLIB_DIR) distclean
index 73fcfbdae93756e02f40ac1cb1128ab425e13ee8..dcf5f8c382b58a122d774d1837db1108daa3924e 100644 (file)
@@ -1,8 +1,10 @@
+.PHONY: test
 test:
        tclsh test.tcl
 
 reference:
        tclsh test.tcl reference
 
+.PHONY: clean
 clean:
        rm -rf test_results test_graphs test_reference
index fde8643e111eae772c40f5c3211d22eee17ead58..a800ff37fdf8bc2f2541687b54d6436eb81d85b0 100755 (executable)
@@ -89,8 +89,10 @@ PANGO_DIR=$(call dirname, $(PANGO_URL))
 BASE_CONFIG=--prefix=$(LOCAL) --disable-dependency-tracking --enable-static=no --enable-shared=yes PKG_CONFIG="$(LOCAL_BIN)/$(PKGCONFIG_BIN)"
 FLAG_CONFIG=CFLAGS="-O2 -mms-bitfields -I$(LOCAL_INCLUDE)" LDFLAGS="-L$(LOCAL_LIB)"
 
+.PHONY: install
 install: $(LOCAL_LIB)/$(PANGO) $(LOCAL_LIB)/$(GD) $(LOCAL_BIN)/$(FLEX_BIN) $(LOCAL_BIN)/$(YACC_BIN)
 
+.PHONY: uninstall
 uninstall:
        $(MAKE) -C $(PANGO_DIR) uninstall
        $(MAKE) -C $(GLIB_DIR) uninstall
@@ -110,6 +112,7 @@ uninstall:
        rm -rf $(LOCAL_BIN)/flex++.exe
        rm -rf $(LOCAL_BIN)/$(YACC_BIN)
        
+.PHONY: distclean
 distclean:
        $(MAKE) -C $(PANGO_DIR) distclean
        $(MAKE) -C $(GLIB_DIR) distclean
@@ -625,9 +628,3 @@ $(UNZIP_BIN_EXE):
        @echo TRANSFERRING ZIP BIN...
        @echo
        $(WGET) $(UNZIP_BIN_URL) || rm -f $(UNZIP_BIN_EXE)
-       
-#
-# phony
-#
-
-.PHONY: install uninstall clean distclean