From d2f0ad78e5285455ce40cd80d62aca6e3ea7bcb6 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Wed, 24 Aug 2011 10:28:54 +0200 Subject: [PATCH] Makefile: allow to define the make command In the global Makefile, allow to redefine the 'make' command with the variable MAKE. This is useful on *BSD: gmake MAKE=gmake --- Makefile | 76 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 40 insertions(+), 36 deletions(-) diff --git a/Makefile b/Makefile index f361a9f..335f549 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +ifndef MAKE + MAKE = make +endif + .PHONY: \ all c clean purge help \ libowlps \ @@ -37,21 +41,21 @@ c: \ owlps-udp-to-http libowlps: - @make -C $@ + @$(MAKE) -C $@ libowlps-client: libowlps - @make -C $@ + @$(MAKE) -C $@ libowlps-resultreader: libowlps - @make -C $@ + @$(MAKE) -C $@ owlps-client: libowlps libowlps-client - @make -C $@ + @$(MAKE) -C $@ owlps-listener: libowlps libowlps-client - @make -C $@ + @$(MAKE) -C $@ owlps-aggregator: libowlps - @make -C $@ + @$(MAKE) -C $@ owlps-udp-to-http: libowlps libowlps-resultreader - @make -C $@ + @$(MAKE) -C $@ owlps-positioning: libowlps - @make -C $@ + @$(MAKE) -C $@ ## Installation ## @@ -65,17 +69,17 @@ install : \ install-owlps-positioning install-libowlps: - @make -C $(subst install-,,$@) install + @$(MAKE) -C $(subst install-,,$@) install install-owlps-client: install-libowlps - @make -C $(subst install-,,$@) install + @$(MAKE) -C $(subst install-,,$@) install install-owlps-listener: install-libowlps - @make -C $(subst install-,,$@) install + @$(MAKE) -C $(subst install-,,$@) install install-owlps-aggregator: install-libowlps - @make -C $(subst install-,,$@) install + @$(MAKE) -C $(subst install-,,$@) install install-owlps-udp-to-http: install-libowlps - @make -C $(subst install-,,$@) install + @$(MAKE) -C $(subst install-,,$@) install install-owlps-positioning: install-libowlps - @make -C $(subst install-,,$@) install + @$(MAKE) -C $(subst install-,,$@) install ## Uninstallation ## @@ -89,40 +93,40 @@ uninstall : \ uninstall-owlps-positioning uninstall-libowlps: - @make -C $(subst uninstall-,,$@) uninstall + @$(MAKE) -C $(subst uninstall-,,$@) uninstall uninstall-owlps-client: - @make -C $(subst uninstall-,,$@) uninstall + @$(MAKE) -C $(subst uninstall-,,$@) uninstall uninstall-owlps-listener: - @make -C $(subst uninstall-,,$@) uninstall + @$(MAKE) -C $(subst uninstall-,,$@) uninstall uninstall-owlps-aggregator: - @make -C $(subst uninstall-,,$@) uninstall + @$(MAKE) -C $(subst uninstall-,,$@) uninstall uninstall-owlps-udp-to-http: - @make -C $(subst uninstall-,,$@) uninstall + @$(MAKE) -C $(subst uninstall-,,$@) uninstall uninstall-owlps-positioning: - @make -C $(subst uninstall-,,$@) uninstall + @$(MAKE) -C $(subst uninstall-,,$@) uninstall ## Cleaning ## clean : - @make -C libowlps clean - @make -C libowlps-client clean - @make -C libowlps-resultreader clean - @make -C owlps-client clean - @make -C owlps-listener clean - @make -C owlps-aggregator clean - @make -C owlps-udp-to-http clean - @make -C owlps-positioning clean + @$(MAKE) -C libowlps clean + @$(MAKE) -C libowlps-client clean + @$(MAKE) -C libowlps-resultreader clean + @$(MAKE) -C owlps-client clean + @$(MAKE) -C owlps-listener clean + @$(MAKE) -C owlps-aggregator clean + @$(MAKE) -C owlps-udp-to-http clean + @$(MAKE) -C owlps-positioning clean purge : - @make -C libowlps purge - @make -C libowlps-client purge - @make -C libowlps-resultreader purge - @make -C owlps-client purge - @make -C owlps-listener purge - @make -C owlps-aggregator purge - @make -C owlps-udp-to-http purge - @make -C owlps-positioning purge + @$(MAKE) -C libowlps purge + @$(MAKE) -C libowlps-client purge + @$(MAKE) -C libowlps-resultreader purge + @$(MAKE) -C owlps-client purge + @$(MAKE) -C owlps-listener purge + @$(MAKE) -C owlps-aggregator purge + @$(MAKE) -C owlps-udp-to-http purge + @$(MAKE) -C owlps-positioning purge ## Help ##