From 1e96d04b760a6027d1efb5cce6b20489173927c7 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Thu, 4 Jul 2013 09:25:19 -0600 Subject: [PATCH] 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}