X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=Makefile.real;h=ee0bf447b53eb5ae957d63fb8977a0d7a5a85538;hp=94d8edf287c67f57b33cd90482dd1625ecfb2a64;hb=de86b880e37b54167ed21198d99156b0acb657d3;hpb=2975726ce97716b97565b065b725f979dad92a88 diff --git a/Makefile.real b/Makefile.real index 94d8edf2..ee0bf447 100644 --- a/Makefile.real +++ b/Makefile.real @@ -1,3 +1,12 @@ +# Implicit rules are implemented in make as suffix rules. The following rule +# empties the suffix list to disable the predefined implicit rules. This +# increases performance and avoids hard-to-debug behaviour. +.SUFFIXES: +MAKEFLAGS += -Rr +ifeq ("$(origin CC)", "default") + CC := cc +endif + vardir := /var/paraslash mandir := $(datarootdir)/man/man1 STRIP := $(CROSS_COMPILE)strip @@ -10,6 +19,7 @@ uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS") uname_rs := $(shell uname -rs) cc_version := $(shell $(CC) --version | head -n 1) GIT_VERSION := $(shell ./GIT-VERSION-GEN git-version.h) +build_date := $(shell date) ifeq ("$(origin O)", "command line") build_dir := $(O) @@ -82,11 +92,10 @@ $(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,$(subst y,Y,\ $(subst z,Z,$1)))))))))))))))))))))))))) CPPFLAGS += -DBINDIR='"$(bindir)"' -CPPFLAGS += -DBUILD_DATE='"$(shell date)"' -CPPFLAGS += -DUNAME_RS='"$(shell uname -rs)"' -CPPFLAGS += -DCC_VERSION='"$(shell $(CC) --version | head -n 1)"' +CPPFLAGS += -DBUILD_DATE='"$(build_date)"' +CPPFLAGS += -DUNAME_RS='"$(uname_rs)"' +CPPFLAGS += -DCC_VERSION='"$(cc_version)"' CPPFLAGS += -DMAIN_INPUT_FILE_IS_$(*F) -CPPFLAGS += $(arch_cppflags) CPPFLAGS += -I/usr/local/include CPPFLAGS += -I$(cmdline_dir) CPPFLAGS += -I$(cmdlist_dir)