From eecd05897ea250a917cfac7b441be7687df98429 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 13 Jan 2020 17:29:08 +0000 Subject: [PATCH] Use Makefile variables for $(CC) and $(CPP) so users can override them. --- GNUmakefile | 9 +++++---- GNUmakefile.docdir | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 8f940e5..d08abcb 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -3,9 +3,10 @@ exec_prefix=$(prefix) sbindir=$(exec_prefix)/sbin datadir=$(prefix)/share -PACKAGE=$(shell gcc -E -dM config.h|awk '$$2=="PACKAGE"{gsub(/"/,"");print$$3}') -VERSION=$(shell gcc -E -dM config.h|awk '$$2=="VERSION"{gsub(/"/,"");print$$3}') -URL=$(shell gcc -E -dM config.h|awk '$$2=="CONTACT"{gsub(/"/,"");print$$3}') +CC = gcc +PACKAGE=$(shell $(CPP) -dM config.h|awk '$$2=="PACKAGE"{gsub(/"/,"");print$$3}') +VERSION=$(shell $(CPP) -dM config.h|awk '$$2=="VERSION"{gsub(/"/,"");print$$3}') +URL=$(shell $(CPP) -dM config.h|awk '$$2=="CONTACT"{gsub(/"/,"");print$$3}') PROJECT_ID := $(PACKAGE)-$(VERSION) @@ -21,7 +22,7 @@ all: $(targets) ja.mo: ja.po in.authd: authd.c config.h - gcc $(CFLAGS) $(LDFLAGS) -o $@ $< + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< authd.pot: authd.c diff --git a/GNUmakefile.docdir b/GNUmakefile.docdir index 1c3a562..a4fe2d6 100644 --- a/GNUmakefile.docdir +++ b/GNUmakefile.docdir @@ -3,9 +3,10 @@ exec_prefix=$(prefix) sbindir=$(exec_prefix)/sbin datadir=$(prefix)/share -PACKAGE=$(shell gcc -E -dM config.h|awk '$$2=="PACKAGE"{gsub(/"/,"");print$$3}') -VERSION=$(shell gcc -E -dM config.h|awk '$$2=="VERSION"{gsub(/"/,"");print$$3}') -URL=$(shell gcc -E -dM config.h|awk '$$2=="CONTACT"{gsub(/"/,"");print$$3}') +CC = gcc +PACKAGE=$(shell $(CPP) -dM config.h|awk '$$2=="PACKAGE"{gsub(/"/,"");print$$3}') +VERSION=$(shell $(CPP) -dM config.h|awk '$$2=="VERSION"{gsub(/"/,"");print$$3}') +URL=$(shell $(CPP) -dM config.h|awk '$$2=="CONTACT"{gsub(/"/,"");print$$3}') PROJECT_ID := $(PACKAGE)-$(VERSION) @@ -21,7 +22,7 @@ all: $(targets) ja.mo: ja.po in.authd: authd.c config.h - gcc $(CFLAGS) $(LDFLAGS) -o $@ $< + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< authd.pot: authd.c