Changeset 2984

Show
Ignore:
Timestamp:
06/28/07 14:46:44 (1 year ago)
Author:
tg
Message:

this might fix bsd make (mkdep(1)) with ccache

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freewrt/mk/vars.mk

    r2950 r2984  
    5353KERNEL_CROSS:=          $(STAGING_TOOLS)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc- 
    5454TARGET_CROSS:=          $(STAGING_TOOLS)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc- 
    55 TARGET_CC:=             $(TARGET_COMPILER_PREFIX) $(TARGET_CROSS)gcc 
    56 TARGET_CXX:=            $(TARGET_COMPILER_PREFIX) $(TARGET_CROSS)g++ 
     55TARGET_CC:=             $(TARGET_COMPILER_PREFIX)$(TARGET_CROSS)gcc 
     56TARGET_CXX:=            $(TARGET_COMPILER_PREFIX)$(TARGET_CROSS)g++ 
    5757TARGET_CPPFLAGS+=       -isystem ${STAGING_DIR}/include \ 
    5858                        -isystem ${STAGING_DIR}/usr/include 
  • trunk/freewrt/rules.mk

    r2905 r2984  
    5757#"))"))"))"))")) # for vim's broken syntax highlighting :) 
    5858 
    59 ifneq ($(FWRT_USE_CCACHE),) 
    60 TARGET_COMPILER_PREFIX+=       ccache 
     59ifneq ($(strip ${FWRT_USE_CCACHE}),) 
     60TARGET_COMPILER_PREFIX=        ccache- 
    6161endif 
    6262 
  • trunk/freewrt/tools/Makefile

    r2858 r2984  
    4141TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS)) 
    4242 
    43 all: install 
     43all: install wrappers 
    4444install: $(TARGETS_INSTALL) ${STAGING_DIR}/etc/ipkg.conf 
    4545install-lbin: $(TARGETS_INSTALL_LBIN) 
    4646clean: $(TARGETS_CLEAN) 
     47 
     48wrappers: 
     49ifneq ($(strip ${FWRT_USE_CCACHE}),) 
     50        @for what in ${TARGET_CROSS}gcc ${TARGET_CROSS}g++; do \ 
     51                if [[ ! -x ${TOPDIR}/lbin/ccache-$$what ]]; then \ 
     52                        rm -f ${TOPDIR}/lbin/ccache-$$what; \ 
     53                        printf '#!/bin/sh\nexec ccache %s "$$@"\n' \ 
     54                            $$what >${TOPDIR}/lbin/ccache-$$what; \ 
     55                        chmod 0555 ${TOPDIR}/lbin/ccache-$$what; \ 
     56                fi; \ 
     57        done 
     58endif 
    4759 
    4860${STAGING_DIR} ${STAGING_DIR}/etc ${STAGING_TOOLS}: