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.
This commit is contained in:
Anthony J. Bentley 2013-07-04 09:25:19 -06:00
parent 7d872ef24f
commit 1e96d04b76

View File

@ -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}