1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-11 02:50:24 +00:00
freebsd-ports/devel/pypersrc/files/patch-GNUmakefile
Joseph Koshy 29a81a3671 - Make this port respect CXX.
- Unbreak on FreeBSD 7.X.

Reported by:	kris (from the dosirak cluster)
2006-04-26 18:47:58 +00:00

47 lines
1.4 KiB
Plaintext

--- GNUmakefile.orig Sun Mar 5 10:32:34 2006
+++ GNUmakefile Thu Apr 27 00:12:07 2006
@@ -6,13 +6,7 @@
include GNUmakefile.config
# Where to install.
-ifeq ($(USER),root)
- INSTALL_DIR=/usr/local/bin
-else
- # Quote INSTALL_DIR (cygwin HOME has space chars)
- # but not wildcards which would suppress globbing.
- INSTALL_DIR="$(HOME)/bin"
-endif
+INSTALL_DIR=$(PREFIX)/bin
INSTALL = install
INSTALL_OWNER =
@@ -82,8 +76,8 @@
CC_OBJS = $(addprefix $(OUT_DIR)/,$(CC_OBJS_))
EXTRA_HH_SRCS = $(addprefix $(HH_SRC_DIR)/,$(EXTRA_HH_SRCS_))
HH_SRCS = $(CC_SRCS:.cc=.hh) $(EXTRA_HH_SRCS)
-CC = g++
-LD = $(CC)
+CXX ?= g++
+LD = $(CXX)
ifeq ($(PROFILE),1)
CC_FLAGS += -pg -O0
LD_FLAGS += -pg -O0
@@ -111,13 +105,14 @@
$(LD) -o $@ $(LD_FLAGS) $(CC_OBJS) $(LD_LIB_FLAGS) $(LIBS)
$(OUT_DIR)/%.o: $(CC_SRC_DIR)/%.cc $(HH_SRCS)
- $(CC) -c -o $@ $(CC_FLAGS) $(subst $(OUT_DIR)/,$(CC_SRC_DIR)/,$<)
+ $(CXX) -c -o $@ $(CC_FLAGS) $(subst $(OUT_DIR)/,$(CC_SRC_DIR)/,$<)
$(CTAGS_LIB): $(CTAGS_SRC_DIR)/config.status $(CTAGS_SRCS)
- make -C $(CTAGS_SRC_DIR) $(MAKECMDGOALS)
+ $(MAKE) -C $(CTAGS_SRC_DIR) $(MAKECMDGOALS)
$(CTAGS_SRC_DIR)/config.status:
- cd $(CTAGS_SRC_DIR) && ./configure
+ cd $(CTAGS_SRC_DIR) && CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" \
+ CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure
define CAT_PYTHON
$(PYTHON) $(TOOLS_DIR)/check.py -tabs $^