[PATCH v2] gives the fcode-utils an install target

This patch gives the fcode-utils' toke, detok, and romheaders commands an install target. This makes "make install" work. Changes since v1: - Added DESTDIR variable Signed-off-by: John Arbuckle <programmingkidx@gmail.com> Index: detok/Makefile =================================================================== --- detok/Makefile (revision 1334) +++ detok/Makefile (working copy) @@ -23,7 +23,7 @@ # PROGRAM = detok - +DESTDIR=/usr/local/bin CC ?= gcc STRIP = strip INCLUDES = -I../shared @@ -63,3 +63,5 @@ .c.o: $(CC) -c $(CFLAGS) $(INCLUDES) $< -o $@ +install: + cp $(PROGRAM) $(DESTDIR)/$(PROGRAM) Index: romheaders/Makefile =================================================================== --- romheaders/Makefile (revision 1334) +++ romheaders/Makefile (working copy) @@ -22,6 +22,8 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA # +PROGRAM=romheaders +DESTDIR=/usr/local/bin CC ?= gcc STRIP = strip CFLAGS = -O2 -Wall -Wextra @@ -39,4 +41,7 @@ clean: rm -f *~ - rm -f romheaders + rm -f $(PROGRAM) + +install: + cp $(PROGRAM) $(DESTDIR)/$(PROGRAM) Index: toke/Makefile =================================================================== --- toke/Makefile (revision 1334) +++ toke/Makefile (working copy) @@ -23,7 +23,7 @@ # PROGRAM = toke - +DESTDIR=/usr/local/bin CC ?= gcc STRIP = strip INCLUDES = -I../shared @@ -73,3 +73,5 @@ .c.o: $(CC) -c $(CFLAGS) $(INCLUDES) $< -o $@ +install: + cp $(PROGRAM) $(DESTDIR)/$(PROGRAM)

On 20/04/15 14:40, Programmingkid wrote:
This patch gives the fcode-utils' toke, detok, and romheaders commands an install target. This makes "make install" work.
Changes since v1: - Added DESTDIR variable
Signed-off-by: John Arbuckle <programmingkidx@gmail.com <mailto:programmingkidx@gmail.com>>
Index: detok/Makefile =================================================================== --- detok/Makefile(revision 1334) +++ detok/Makefile(working copy) @@ -23,7 +23,7 @@ #
PROGRAM = detok - +DESTDIR=/usr/local/bin CC ?= gcc STRIP= strip INCLUDES = -I../shared @@ -63,3 +63,5 @@ .c.o: $(CC) -c $(CFLAGS) $(INCLUDES) $< -o $@
+install: +cp $(PROGRAM) $(DESTDIR)/$(PROGRAM) Index: romheaders/Makefile =================================================================== --- romheaders/Makefile(revision 1334) +++ romheaders/Makefile(working copy) @@ -22,6 +22,8 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA #
+PROGRAM=romheaders +DESTDIR=/usr/local/bin CC?= gcc STRIP = strip CFLAGS = -O2 -Wall -Wextra @@ -39,4 +41,7 @@
clean: rm -f *~ -rm -f romheaders +rm -f $(PROGRAM) + +install: +cp $(PROGRAM) $(DESTDIR)/$(PROGRAM) Index: toke/Makefile =================================================================== --- toke/Makefile(revision 1334) +++ toke/Makefile(working copy) @@ -23,7 +23,7 @@ #
PROGRAM = toke - +DESTDIR=/usr/local/bin CC ?= gcc STRIP= strip INCLUDES = -I../shared @@ -73,3 +73,5 @@ .c.o: $(CC) -c $(CFLAGS) $(INCLUDES) $< -o $@
+install: +cp $(PROGRAM) $(DESTDIR)/$(PROGRAM)
This looks much better to me, although I can't really test as it appears in my mail reader as HTML :/ ATB, Mark.

On Apr 20, 2015, at 3:41 PM, Mark Cave-Ayland wrote:
On 20/04/15 14:40, Programmingkid wrote:
This patch gives the fcode-utils' toke, detok, and romheaders commands an install target. This makes "make install" work.
Changes since v1: - Added DESTDIR variable
Signed-off-by: John Arbuckle <programmingkidx@gmail.com <mailto:programmingkidx@gmail.com>>
Index: detok/Makefile =================================================================== --- detok/Makefile(revision 1334) +++ detok/Makefile(working copy) @@ -23,7 +23,7 @@ #
PROGRAM = detok - +DESTDIR=/usr/local/bin CC ?= gcc STRIP= strip INCLUDES = -I../shared @@ -63,3 +63,5 @@ .c.o: $(CC) -c $(CFLAGS) $(INCLUDES) $< -o $@
+install: +cp $(PROGRAM) $(DESTDIR)/$(PROGRAM) Index: romheaders/Makefile =================================================================== --- romheaders/Makefile(revision 1334) +++ romheaders/Makefile(working copy) @@ -22,6 +22,8 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA #
+PROGRAM=romheaders +DESTDIR=/usr/local/bin CC?= gcc STRIP = strip CFLAGS = -O2 -Wall -Wextra @@ -39,4 +41,7 @@
clean: rm -f *~ -rm -f romheaders +rm -f $(PROGRAM) + +install: +cp $(PROGRAM) $(DESTDIR)/$(PROGRAM) Index: toke/Makefile =================================================================== --- toke/Makefile(revision 1334) +++ toke/Makefile(working copy) @@ -23,7 +23,7 @@ #
PROGRAM = toke - +DESTDIR=/usr/local/bin CC ?= gcc STRIP= strip INCLUDES = -I../shared @@ -73,3 +73,5 @@ .c.o: $(CC) -c $(CFLAGS) $(INCLUDES) $< -o $@
+install: +cp $(PROGRAM) $(DESTDIR)/$(PROGRAM)
This looks much better to me, although I can't really test as it appears in my mail reader as HTML :/
ATB,
Mark.
What mail reader are you using? Are you able to read the raw source of the email? I will just send it again as an attachment with this email.

Am 20.04.2015 um 15:40 schrieb Programmingkid:
This patch gives the fcode-utils' toke, detok, and romheaders commands an install target. This makes "make install" work.
Changes since v1: - Added DESTDIR variable
Signed-off-by: John Arbuckle <programmingkidx@gmail.com <mailto:programmingkidx@gmail.com>>
Index: detok/Makefile =================================================================== --- detok/Makefile(revision 1334) +++ detok/Makefile(working copy) @@ -23,7 +23,7 @@ #
PROGRAM = detok - +DESTDIR=/usr/local/bin
Sorry, I see that my message was inconsistent. I really meant DESTDIR=/usr/local with DESTDIR=/usr as test case ...
CC ?= gcc STRIP= strip INCLUDES = -I../shared @@ -63,3 +63,5 @@ .c.o: $(CC) -c $(CFLAGS) $(INCLUDES) $< -o $@
+install: +cp $(PROGRAM) $(DESTDIR)/$(PROGRAM)
... which here means: mkdir -p $(DESTDIR)/bin cp $(PROGRAM) $(DESTDIR)/bin/$(PROGRAM) And the same below. Apart from HTML looking good otherwise. Regards, Andreas
Index: romheaders/Makefile =================================================================== --- romheaders/Makefile(revision 1334) +++ romheaders/Makefile(working copy) @@ -22,6 +22,8 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA #
+PROGRAM=romheaders +DESTDIR=/usr/local/bin CC?= gcc STRIP = strip CFLAGS = -O2 -Wall -Wextra @@ -39,4 +41,7 @@
clean: rm -f *~ -rm -f romheaders +rm -f $(PROGRAM) + +install: +cp $(PROGRAM) $(DESTDIR)/$(PROGRAM) Index: toke/Makefile =================================================================== --- toke/Makefile(revision 1334) +++ toke/Makefile(working copy) @@ -23,7 +23,7 @@ #
PROGRAM = toke - +DESTDIR=/usr/local/bin CC ?= gcc STRIP= strip INCLUDES = -I../shared @@ -73,3 +73,5 @@ .c.o: $(CC) -c $(CFLAGS) $(INCLUDES) $< -o $@
+install: +cp $(PROGRAM) $(DESTDIR)/$(PROGRAM)
-- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton; HRB 21284 (AG Nürnberg)

On 22/04/15 11:48, Andreas Färber wrote:
Am 20.04.2015 um 15:40 schrieb Programmingkid:
This patch gives the fcode-utils' toke, detok, and romheaders commands an install target. This makes "make install" work.
Changes since v1: - Added DESTDIR variable
Signed-off-by: John Arbuckle <programmingkidx@gmail.com <mailto:programmingkidx@gmail.com>>
Index: detok/Makefile =================================================================== --- detok/Makefile(revision 1334) +++ detok/Makefile(working copy) @@ -23,7 +23,7 @@ #
PROGRAM = detok - +DESTDIR=/usr/local/bin
Sorry, I see that my message was inconsistent. I really meant DESTDIR=/usr/local with DESTDIR=/usr as test case ...
CC ?= gcc STRIP= strip INCLUDES = -I../shared @@ -63,3 +63,5 @@ .c.o: $(CC) -c $(CFLAGS) $(INCLUDES) $< -o $@
+install: +cp $(PROGRAM) $(DESTDIR)/$(PROGRAM)
... which here means:
mkdir -p $(DESTDIR)/bin cp $(PROGRAM) $(DESTDIR)/bin/$(PROGRAM)
And the same below.
Apart from HTML looking good otherwise.
Yes, I agree too. I'll post my tidied-up version of the patch to the list and commit it later if no-one has any objections. BTW Andreas did you want to give an explicit R-B for the patch? Let me know if you would like it added before commit. ATB, Mark.
participants (3)
-
Andreas Färber
-
Mark Cave-Ayland
-
Programmingkid