From 540b950d2239cd883a7cdbde7ddba3d485ef31c7 Mon Sep 17 00:00:00 2001 From: William Kendrick Date: Wed, 25 Jul 2007 16:43:18 +0000 Subject: [PATCH] Generation of tp-magic-config is now done at build time, rather than install time (to make it easier to package). (Thx SynrG) --- Makefile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index e47580966..c9901da96 100644 --- a/Makefile +++ b/Makefile @@ -159,7 +159,7 @@ MOUSE_CFLAGS=-Isrc/$(MOUSEDIR) -D$(CURSOR_SHAPES)_CURSOR_SHAPES # "make" with no arguments builds the program and man page from sources: -all: tuxpaint translations magic-plugins +all: tuxpaint translations magic-plugins tp-magic-config @echo @echo "--------------------------------------------------------------" @echo @@ -351,11 +351,7 @@ install-magic-plugins: install-magic-plugin-dev: src/tp_magic_api.h @echo @echo "...Installing Magic Tool plug-in development files and docs..." - @-rm $(BIN_PREFIX)/tp-magic-config - @sed src/tp-magic-config.sh -e s/__VERSION__/$(VER_VERSION)/ \ - -e s/__APIVERSION__/$(MAGIC_API_VERSION)/ \ - -e s=__INCLUDE__=$(INCLUDE_PREFIX)/tuxpaint= > \ - $(BIN_PREFIX)/tp-magic-config + @cp tp-magic-config $(BIN_PREFIX) @chmod a+rx,g-w,o-w $(BIN_PREFIX)/tp-magic-config @install -d $(INCLUDE_PREFIX)/tuxpaint @cp src/tp_magic_api.h $(INCLUDE_PREFIX)/tuxpaint @@ -492,6 +488,7 @@ clean: @#if [ -d obj ]; then rmdir obj; fi @-rm -f trans/*.mo @-rm -f src/tp_magic_api.h + @-rm -f tp-magic-config @if [ -d trans ]; then rmdir trans; fi @cd magic ; make clean @echo @@ -928,6 +925,14 @@ src/tp_magic_api.h: src/tp_magic_api.h.in @cat src/tp_magic_api.h.in | sed -e s/__APIVERSION__/$(MAGIC_API_VERSION)/ > src/tp_magic_api.h +tp-magic-config: src/tp-magic-config.sh.in Makefile + @echo + @echo "...Generating 'Magic' tool API configuration script..." + @sed src/tp-magic-config.sh.in -e s/__VERSION__/$(VER_VERSION)/ \ + -e s/__APIVERSION__/$(MAGIC_API_VERSION)/ \ + -e s=__INCLUDE__=$(INCLUDE_PREFIX)/tuxpaint= > \ + tp-magic-config + # Make the "obj" directory to throw the object(s) into: # (not necessary any more; bjk 2006.02.20)