From 1e96d04b760a6027d1efb5cce6b20489173927c7 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Thu, 4 Jul 2013 09:25:19 -0600 Subject: [PATCH 1/3] Fix some Linuxisms. Use ${MAKE}, not make, inside Makefiles (don't assume make = GNU make). Replace nonstandard rmdir option that doesn't work on, e.g., BSD. --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 70b5a9a..4954da0 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ include Makefile.common $(MKDEP) libs/%.so: FAKE - @make -C libs $(notdir $@) + @${MAKE} -C libs $(notdir $@) # # Testing section - there are three types of tests: @@ -226,7 +226,7 @@ xc6slx9.svg: draw_svg_tiles ./draw_svg_tiles | xmllint --pretty 1 - > $@ clean: - @make -C libs clean + @${MAKE} -C libs clean rm -f $(OBJS) *.d rm -f draw_svg_tiles new_fp hstrrep sort_seq merge_seq autotest rm -f fp2bit bit2fp printf_swbits pair2net hello_world blinking_led @@ -246,10 +246,10 @@ clean: rm -f $(foreach f, $(COMPARE_TESTS), test.out/compare_$(f).fcd) rm -f $(foreach f, $(COMPARE_TESTS), test.out/compare_$(f).fce) rm -f test.out/compare_xc6slx9.fp - rmdir --ignore-fail-on-non-empty test.out test.gold + rm -rf test.out test.gold install: fp2bit bit2fp - @make -C libs install + @${MAKE} -C libs install mkdir -p $(DESTDIR)/$(PREFIX)/bin/ install -m 755 fp2bit $(DESTDIR)/$(PREFIX)/bin/ install -m 755 bit2fp $(DESTDIR)/$(PREFIX)/bin/ @@ -257,5 +257,5 @@ install: fp2bit bit2fp chrpath -d $(DESTDIR)/$(PREFIX)/bin/bit2fp uninstall: - @make -C libs uninstall + @${MAKE} -C libs uninstall rm -f $(DESTDIR)/$(PREFIX)/bin/{fp2bit,bit2fp} From 81fc67584e72c2e4b49c06f55669e3ad0ea79ef5 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Thu, 4 Jul 2013 11:21:55 -0600 Subject: [PATCH 2/3] Don't assume bash is at /bin/bash (not the case on, e.g., BSD). --- Makefile.common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.common b/Makefile.common index d454321..5eea632 100644 --- a/Makefile.common +++ b/Makefile.common @@ -8,7 +8,7 @@ PREFIX ?= /usr/local -SHELL = /bin/bash +SHELL = bash # -fno-omit-frame-pointer and -ggdb add almost nothing to execution # time right now, so we can leave them in all the time. From 0e8d6902360def7ba000c4f85da06b06aacb6a54 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Fri, 5 Jul 2013 03:09:38 -0600 Subject: [PATCH 3/3] Use $(MAKE) instead of ${MAKE}, to match the rest of the Makefile. --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 4954da0..e5c48ff 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ include Makefile.common $(MKDEP) libs/%.so: FAKE - @${MAKE} -C libs $(notdir $@) + @$(MAKE) -C libs $(notdir $@) # # Testing section - there are three types of tests: @@ -226,7 +226,7 @@ xc6slx9.svg: draw_svg_tiles ./draw_svg_tiles | xmllint --pretty 1 - > $@ clean: - @${MAKE} -C libs clean + @$(MAKE) -C libs clean rm -f $(OBJS) *.d rm -f draw_svg_tiles new_fp hstrrep sort_seq merge_seq autotest rm -f fp2bit bit2fp printf_swbits pair2net hello_world blinking_led @@ -249,7 +249,7 @@ clean: rm -rf test.out test.gold install: fp2bit bit2fp - @${MAKE} -C libs install + @$(MAKE) -C libs install mkdir -p $(DESTDIR)/$(PREFIX)/bin/ install -m 755 fp2bit $(DESTDIR)/$(PREFIX)/bin/ install -m 755 bit2fp $(DESTDIR)/$(PREFIX)/bin/ @@ -257,5 +257,5 @@ install: fp2bit bit2fp chrpath -d $(DESTDIR)/$(PREFIX)/bin/bit2fp uninstall: - @${MAKE} -C libs uninstall + @$(MAKE) -C libs uninstall rm -f $(DESTDIR)/$(PREFIX)/bin/{fp2bit,bit2fp}