1 # $DragonFly: src/gnu/usr.bin/cc40/cc_prep/Attic/Makefile,v 1.1 2005/06/05 22:43:20 corecode Exp $
3 .include "../Makefile.inc"
5 PATCHES!= echo ${.CURDIR}/patches/*.patch
6 CONTRIBDIR= ${GCCDIR}/gcc
8 version_local.c: version.c Makefile
9 sed -e 's/\(const char version.*\)";/\1 [DragonFly]";/' < ${.ALLSRC:M*c} > ${.TARGET}
11 configargs.h: Makefile
12 echo '/* Generated automatically. */' > configargs.h
13 echo 'static const char configuration_arguments[] = "./configure --prefix=/usr --host=${target}";' >> configargs.h
14 echo 'static const char thread_model[] = "posix";' >> configargs.h
16 echo 'static const struct {' >> configargs.h
17 echo ' const char *name, *value;' >> configargs.h
18 echo '} configure_default_options[] = { { NULL, NULL} };' >> configargs.h
20 CLEANFILES+= version_local.c configargs.h
22 .include <bsd.prog.mk>
25 depend: version_local.c configargs.h
27 # we don't use SRCS, so we can't use the normal bsd.dep.mk code
28 .for _PSRC in ${PATCHES:M*.patch}
29 .for _PC in ${_PSRC:T:S/.patch$//:S|,|/|g}
31 ${_PC}: ${CONTRIBDIR}/${_PC} ${_PSRC}
33 patch -o ${.TARGET} -i ${.ALLSRC:M*.patch} ${CONTRIBDIR}/${.TARGET}
35 CLEANFILES:= ${CLEANFILES} ${_PC}