makefile: improve git integration

pull/3/head
Jonathan Moore Liles 2008-05-27 16:27:19 -05:00
parent 452292a943
commit b4e2a6b4b6
2 changed files with 8 additions and 2 deletions

View File

@ -1,11 +1,14 @@
# -*- mode: makefile; -*-
# always regenerate source list when running under git
FOO := $(shell [ -f .git ] && [ -x `which git` ] && rm -f FL/.sources )
FL/.sources:
@ echo "FL_SRCS=\\" > FL/.sources
@ git ls-files 'FL/*.C' | tr '\n' ' ' >> FL/.sources
@ git ls-files 'FL/*.fl' | tr '\n' ' ' >> FL/.sources
include FL/.sources
-include FL/.sources
FL_SRCS:=$(FL_SRCS:.fl=.C)
FL_OBJS:=$(FL_SRCS:.C=.o)

View File

@ -2,12 +2,15 @@
Timeline_VERSION := 0.5.0
# always regenerate source list when running under git
FOO := $(shell [ -f .git ] && [ -x `which git` ] && rm -f FL/.sources )
Timeline/.sources:
@ echo "Timeline_SRCS=\\" > Timeline/.sources
@ git ls-files 'Timeline/*.C' | tr '\n' ' ' >> Timeline/.sources
@ git ls-files 'Timeline/*.fl' | tr '\n' ' ' >> Timeline/.sources
include Timeline/.sources
-include Timeline/.sources
Timeline_SRCS += util/debug.C