diff --git a/Makefile b/Makefile index 0711724f3..13221807b 100644 --- a/Makefile +++ b/Makefile @@ -157,9 +157,15 @@ DEBUG_FLAGS:= MOUSE_CFLAGS:=-Isrc/$(MOUSEDIR) -D$(CURSOR_SHAPES)_CURSOR_SHAPES +.SUFFIXES +############################################################################# +############################################################################# +############################################################################# +# # "make" with no arguments builds the program and man page from sources: - +# +.PHONY: all all: tuxpaint translations magic-plugins tp-magic-config @echo @echo "--------------------------------------------------------------" @@ -175,6 +181,7 @@ all: tuxpaint translations magic-plugins tp-magic-config @echo "or run 'sudo make install'.)" @echo +.PHONY: releaseclean releaseclean: @echo @echo "Cleaning release directory" @@ -182,8 +189,10 @@ releaseclean: @rm -rf "build/tuxpaint-$(VER_VERSION)" "build/tuxpaint-$(VER_VERSION).tar.gz" @-if [ -d build ] ; then rmdir build ; fi +.PHONY: releasedir releasedir: build/tuxpaint-$(VER_VERSION) + build/tuxpaint-$(VER_VERSION): @echo @echo "Creating release directory" @@ -193,6 +202,7 @@ build/tuxpaint-$(VER_VERSION): \( -wholename '*/CVS' -o -name .cvsignore -o -name 'build' -o -name '.#*' \) \ -prune -o -type f -exec cp --parents -vdp \{\} build/tuxpaint-$(VER_VERSION)/ \; +.PHONY: release release: releasedir @echo @echo "Creating release tarball" @@ -202,7 +212,7 @@ release: releasedir # "make nosound" builds the program with sound disabled: - +.PHONY: nosound nosound: @echo @echo "Building with sound DISABLED" @@ -211,7 +221,7 @@ nosound: # "make nosvg" builds the program with SVG (Cairo2) support disabled: - +.PHONY: nosvg nosvg: @echo @echo "Building with SVG DISABLED" @@ -220,7 +230,7 @@ nosvg: # "make nopango" builds the program with Pango support disabled: - +.PHONY: nopango nopango: @echo @echo "Building with Pango DISABLED" @@ -229,7 +239,7 @@ nopango: # "make oldsvg" builds the program using older SVG (Cairo1) libraries: - +.PHONY: oldsvg oldsvg: @echo @echo "Building with CAIRO1 SVG SUPPORT" @@ -238,7 +248,7 @@ oldsvg: # "make olpc" builds the program for an OLPC XO: - +.PHONY: olpc olpc: @echo @echo "Building for an OLPC XO" @@ -247,7 +257,7 @@ olpc: # "make beos" builds the program for BeOS - +.PHONY: beos beos: make \ PREFIX:=./ \ @@ -280,6 +290,7 @@ beos: # "make win32" builds the program for Windows 2K/XP/Vista using MinGW/MSYS. # The DATA_, DOC_ and LOCALE_ prefixes are absolute paths. # Suitable for development/testing in the MinGW/MSYS environment. +.PHONY: win32 win32: make \ PREFIX:=/usr/local \ @@ -309,6 +320,7 @@ win32: # "make win9x" builds the program for Windows 9x/ME using MinGW/MSYS. # The DATA_, DOC_ and LOCALE_ prefixes are absolute paths. # Suitable for development/testing in the MinGW/MSYS environment. +.PHONY: win9x win9x: make \ PREFIX:=/usr/local \ @@ -338,7 +350,7 @@ win9x: PAPER_LIB:= # "make nokia770" builds the program for the Nokia 770. - +.PHONY: nokia770 nokia770: make \ DATA_PREFIX:=/usr/share/tuxpaint \ @@ -356,7 +368,7 @@ include Makefile-i18n # "make install" installs all of the various parts # (depending on the *PREFIX variables at the top, you probably need # to do this as superuser ("root")) - +.PHONY: install install: install-bin install-data install-man install-doc \ install-magic-plugins \ install-magic-plugin-dev \ @@ -381,7 +393,7 @@ install: install-bin install-data install-man install-doc \ @echo "Enjoy!" @echo - +.PHONY: install-magic-plugins install-magic-plugins: @echo @echo "...Installing Magic Tool plug-ins..." @@ -396,6 +408,7 @@ install-magic-plugins: @chmod a+r,g-w,o-w $(DATA_PREFIX)/sounds/magic/*.wav \ $(DATA_PREFIX)/sounds/magic/*.ogg +.PHONY: install-magic-plugins install-magic-plugin-dev: src/tp_magic_api.h @echo @echo "...Installing Magic Tool plug-in development files and docs..." @@ -410,7 +423,7 @@ install-magic-plugin-dev: src/tp_magic_api.h # Installs the various parts for the MinGW/MSYS development/testing environment. - +.PHONY: install-private-win32 install-private-win32: install-bin install-data install-man install-doc \ install-magic-plugins \ install-magic-plugin-dev \ @@ -436,7 +449,7 @@ install-private-win32: install-bin install-data install-man install-doc \ # Installs the various parts for the MinGW/MSYS development/testing environment. - +.PHONY: bdist-private-win32 bdist-private-win32: install-bin install-data install-doc \ install-magic-plugins \ install-gettext install-im install-dlls\ @@ -452,7 +465,7 @@ bdist-private-win32: install-bin install-data install-doc \ # "make install-beos" installs Tux Paint, but using BeOS settings - +.PHONY: install-beos install-beos: make install \ PREFIX:=/boot/develop/tools/gnupro \ @@ -477,6 +490,7 @@ install-beos: # "make install-win32" installs Tux Paint, but using MinGW/MSYS settings # Suitable for development/testing in the MinGW/MSYS environment. +.PHONY: install-win32 install-win32: @strip -s tuxpaint.exe @make install-private-win32 \ @@ -496,6 +510,7 @@ install-win32: # "make bdist-win32" recompiles Tux Paint to work with executable-relative # data, docs and locale directories. Also copies all files, including DLLs, # into a 'bdist' output directory ready for processing by an installer script. +.PHONY: bdist-win32 bdist-win32: @-rm -f tuxpaint.exe @-rm -f obj/*.o @@ -534,6 +549,7 @@ bdist-win32: TARGET_PASSTHRU:=win32 # "make bdist-clean" deletes the 'bdist' directory +.PHONY: bdist-clean bdist-clean: @echo @echo "Cleaning up the 'bdist' directory! ($(PWD))" @@ -542,7 +558,7 @@ bdist-clean: # "make clean" deletes the program, the compiled objects and the # built man page (returns to factory archive, pretty much...) - +.PHONY: clean clean: @echo @echo "Cleaning up the build directory! ($(PWD))" @@ -556,6 +572,7 @@ clean: @cd magic && make clean$(TARGET_PASSTHRU) @echo +.PHONY: clean-win32 clean-win32: @make clean\ TARGET_PASSTHRU:=win32 @@ -563,7 +580,7 @@ clean-win32: # "make uninstall" should remove the various parts from their # installation locations. BE SURE the *PREFIX variables at the top # are the same as they were when you installed, of course!!! - +.PHONY: uninstall uninstall: uninstall-i18n -if [ "x$(GNOME_PREFIX)" != "x" ]; then \ rm $(GNOME_PREFIX)/share/applications/tuxpaint.desktop; \ @@ -604,7 +621,7 @@ uninstall: uninstall-i18n # Install default config file: - +.PHONY: install-default-config install-default-config: @echo @echo "...Installing default config file..." @@ -614,7 +631,7 @@ install-default-config: # Install example stamps - +.PHONY: install-example-stamps install-example-stamps: @echo @echo "...Installing example stamps..." @@ -624,7 +641,7 @@ install-example-stamps: # Install example starters - +.PHONY: install-example-starters install-example-starters: @echo @echo "...Installing example starter images..." @@ -634,7 +651,7 @@ install-example-starters: # Install a launcher icon in the Gnome menu - +.PHONY: install-gnome install-gnome: @echo @echo "...Installing launcher icon into GNOME..." @@ -649,7 +666,7 @@ install-gnome: # Install a launcher icon for the Nokia 770. - +.PHONY: install-nokia770 install-nokia770: @echo @echo "...Installing launcher icon into the Nokia 770..." @@ -674,7 +691,7 @@ install-nokia770: # Install a launcher icon in the KDE menu... - +.PHONY: install-kde install-kde: @echo @echo "...Installing launcher icon into KDE..." @@ -684,7 +701,7 @@ install-kde: chmod 644 $(DESTDIR)$(KDE_PREFIX)/Graphics/tuxpaint.desktop; \ fi - +.PHONY: install-kde-icons install-kde-icons: @echo "...Installing launcher icon graphics into KDE..." @if [ "x$(KDE_ICON_PREFIX)" != "x" ]; then \ @@ -731,7 +748,7 @@ install-kde-icons: # and the 24-color 32x32 XPM (for other Window managers): # FIXME: Should this also use $(DESTDIR)? - +.PHONY: install-icon install-icon: @echo @echo "...Installing launcher icon graphics..." @@ -744,7 +761,7 @@ install-icon: # Install the program: - +.PHONY: install-bin install-bin: @echo @echo "...Installing program itself..." @@ -753,7 +770,7 @@ install-bin: @chmod a+rx,g-w,o-w $(BIN_PREFIX)/tuxpaint$(EXE_EXT) # Install the required Windows DLLs into the 'bdist' directory - +.PHONY: install-dlls install-dlls: @echo @echo "...Installing Windows DLLs..." @@ -807,7 +824,7 @@ install-dlls: @strip -s $(BIN_PREFIX)/lib/pango/1.6.0/modules/*.dll # Install the import script: - +.PHONY: install-importscript install-importscript: @echo @echo "...Installing 'tuxpaint-import' script..." @@ -816,7 +833,7 @@ install-importscript: # Install the data (sound, graphics, fonts): - +.PHONY: install-data install-data: @echo @echo "...Installing data files..." @@ -832,7 +849,7 @@ install-data: # Install the text documentation: - +.PHONY: install-doc install-doc: @echo @echo "...Installing documentation..." @@ -843,7 +860,7 @@ install-doc: # Install the man page: - +.PHONY: install-man install-man: @echo @echo "...Installing man pages..." @@ -1012,7 +1029,7 @@ obj/resource.o: win32/resources.rc win32/resource.h # Go into 'magic' subdirectory and buld magic plug-ins - +.PHONY: magic-plugins magic-plugins: src/tp_magic_api.h @cd magic && make $(TARGET_PASSTHRU) @@ -1039,6 +1056,3 @@ tp-magic-config: src/tp-magic-config.sh.in Makefile obj: @mkdir obj - -.PHONY: win32 - diff --git a/Makefile-i18n b/Makefile-i18n index 2cf7db7f6..cfea59ac4 100644 --- a/Makefile-i18n +++ b/Makefile-i18n @@ -21,7 +21,7 @@ IM_PREFIX=$(DESTDIR)$(PREFIX)/share/tuxpaint/im # A default target, in case someone tries using this makefile directly... - +.PHONY: all-i18n all-i18n: @echo "This is Makefile-i18n; don't use it directly, it's used by Makefile" @@ -32,6 +32,7 @@ INSTALLED_MOFILES:=$(patsubst trans/%.mo,$(LOCALE_PREFIX)/%/LC_MESSAGES/tuxpaint $(INSTALLED_MOFILES): $(LOCALE_PREFIX)/%/LC_MESSAGES/tuxpaint.mo: trans/%.mo install -D -m 644 $< $@ +.PHONY: uninstall-i18n uninstall-i18n: -rm $(LOCALE_PREFIX)/*/LC_MESSAGES/tuxpaint.mo -rm $(IM_PREFIX)/ja.im @@ -41,12 +42,12 @@ uninstall-i18n: # Install the translated text: - +.PHONY: install-gettext install-gettext: $(INSTALLED_MOFILES) # Install the Input Method files: - +.PHONY: install-im ifneq ($(IM_PREFIX),) install-im: @echo @@ -81,6 +82,7 @@ endif $(MOFILES): trans/%.mo: src/po/%.po msgfmt -o $@ $< +.PHONY: translations translations: trans $(MOFILES) trans: diff --git a/docs/Makefile b/docs/Makefile index 58bd315f4..673b795eb 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -12,8 +12,10 @@ LINKS:=links -dump -no-numbering -no-references +.PHONY: all all: README.txt OPTIONS.txt FAQ.txt EXTENDING.txt ADVANCED-STAMPS-HOWTO.txt +.PHONY: clean clean: -rm README.txt -rm OPTIONS.txt diff --git a/docs/fr/Makefile b/docs/fr/Makefile index bf30c319a..d6af60f44 100644 --- a/docs/fr/Makefile +++ b/docs/fr/Makefile @@ -11,8 +11,10 @@ LINKS:=links -dump -no-numbering -no-references +.PHONY: all all: README1.txt README2.txt OPTIONS.txt FAQ.txt PNG.txt +.PHONY: clean clean: -rm README1.txt -rm README2.txt diff --git a/docs/ru/Makefile b/docs/ru/Makefile index ecf649d39..0bedc4540 100644 --- a/docs/ru/Makefile +++ b/docs/ru/Makefile @@ -12,9 +12,11 @@ LINKS:=links -dump -no-numbering -no-references +.PHONY: all all: README.txt OPTIONS.txt EXTENDING.txt FAQ.txt # ADVANCED-STAMPS-HOWTO.txt +.PHONY: clean clean: -rm README.txt -rm OPTIONS.txt diff --git a/docs/zh_cn/Makefile b/docs/zh_cn/Makefile index 901d212bb..e465f57a6 100644 --- a/docs/zh_cn/Makefile +++ b/docs/zh_cn/Makefile @@ -11,11 +11,13 @@ LINKS:=links -dump -no-numbering -no-references +.PHONY: all all: README.txt FAQ.txt # OPTIONS.txt # EXTENDING.txt # ADVANCED-STAMPS-HOWTO.txt +.PHONY: clean clean: -rm README.txt -rm FAQ.txt diff --git a/docs/zh_tw/Makefile b/docs/zh_tw/Makefile index 16eb308ab..73189f35a 100644 --- a/docs/zh_tw/Makefile +++ b/docs/zh_tw/Makefile @@ -11,12 +11,14 @@ LINKS:=links -dump -no-numbering -no-references +.PHONY: all all: README.txt \ OPTIONS.txt # FAQ.txt \ # EXTENDING.txt \ # ADVANCED-STAMPS-HOWTO.txt +.PHONY: clean clean: -rm README.txt -rm OPTIONS.txt diff --git a/magic/Makefile b/magic/Makefile index c70ef15a9..c26f63658 100644 --- a/magic/Makefile +++ b/magic/Makefile @@ -26,6 +26,7 @@ SDL_MIXER_LIB:=-lSDL_mixer ARCH_LINKS:=-lintl -lpng12 SDL_LIBS:=-L/usr/local/lib -lmingw32 -lSDL -lSDL_image -lSDL_ttf $(SDL_MIXER_LIB) +.PHONY: all all: negative.$(SO_TYPE) \ fade_darken.$(SO_TYPE) \ mirror_flip.$(SO_TYPE) \ @@ -52,9 +53,11 @@ all: negative.$(SO_TYPE) \ distortion.$(SO_TYPE) @strip *.$(SO_TYPE) +.PHONY: install install: cd .. ; make install-magic-plugins +.PHONY: clean clean: @echo @echo "Cleaning up the Magic plug-ins directory ($(PWD))" @@ -62,7 +65,7 @@ clean: # beos versions of the targets - +.PHONY: beos beos: make \ SO_TYPE:=so \ @@ -70,11 +73,12 @@ beos: # win32 versions of the targets - +.PHONY: cleanwin32 cleanwin32: make clean \ SO_TYPE:=dll +.PHONY: win32 win32: make \ SO_TYPE:=dll \ diff --git a/magic/docs/Makefile b/magic/docs/Makefile index 1386fddfe..be0e0d512 100644 --- a/magic/docs/Makefile +++ b/magic/docs/Makefile @@ -12,8 +12,10 @@ LINKS:=links -dump -no-numbering -no-references +.PHONY: all all: README.txt +.PHONY: clean clean: -rm README.txt diff --git a/magic/magic-docs/Makefile b/magic/magic-docs/Makefile index 788998d0f..874ccc916 100644 --- a/magic/magic-docs/Makefile +++ b/magic/magic-docs/Makefile @@ -41,8 +41,10 @@ TXT_FILES:= \ tint.txt \ waves.txt +.PHONY: all all: $(TXT_FILES) +.PHONY: clean clean: @-rm $(TXT_FILES) diff --git a/src/Makefile b/src/Makefile index 751e8f968..2f87935bf 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,2 +1,3 @@ +.PHONY: all all: cd .. ; make