Move broken dependency hack out of most Makefile.am's, except the for the root.
parent
10c8ebdd51
commit
2bcb709cf4
|
@ -43,3 +43,10 @@ EXTRA_DIST= \
|
||||||
# get rid of SVN stuff in the tarball
|
# get rid of SVN stuff in the tarball
|
||||||
dist-hook:
|
dist-hook:
|
||||||
rm -rf `find $(distdir) -type d -name .svn`
|
rm -rf `find $(distdir) -type d -name .svn`
|
||||||
|
|
||||||
|
# HACK Don't give make errors when switching between trunk and branches.
|
||||||
|
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file.
|
||||||
|
.PHONY: fixbrokendeps
|
||||||
|
fixbrokendeps:
|
||||||
|
$(srcdir)/fixbrokendependencies
|
||||||
|
all: fixbrokendeps
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# HACK Don't give make errors when switching between trunk and branches.
|
||||||
|
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file.
|
||||||
|
# Now with PD-ksh support.
|
||||||
|
|
||||||
|
if ! rootdir="`git rev-parse --show-cdup 2> /dev/null`"
|
||||||
|
then
|
||||||
|
echo "Not in a git repository."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
for path in src/ lib/*/ lib/*/*/
|
||||||
|
do
|
||||||
|
srcpath="${rootdir}${path}"
|
||||||
|
deppath="${path}.deps/"
|
||||||
|
if [ -d "${srcpath}" -a -d "${deppath}" ]
|
||||||
|
then
|
||||||
|
for ext in c cpp
|
||||||
|
do
|
||||||
|
# Iterate over all files that might have broken dependencies.
|
||||||
|
for fname in `cd ${srcpath} ; echo *.${ext}`
|
||||||
|
do
|
||||||
|
fpref="`echo "${fname}" | sed "s/\.${ext}//"`"
|
||||||
|
srcfile="${srcpath}${fname}"
|
||||||
|
depfile="${deppath}${fpref}.Po"
|
||||||
|
|
||||||
|
# Check if the dependency file ${depfile} exists and is broken. (The ${srcfile} check prevents looking for files literally called "*.cpp".)
|
||||||
|
if [ -f "${srcfile}" -a -f "${depfile}" ] && ! grep -q "\b${fname}\b" "${depfile}" 2> /dev/null
|
||||||
|
then
|
||||||
|
relpath="`echo "${path}" | sed "s/[^./]*\//..\//g"`"
|
||||||
|
echo "${fpref}.o: ${relpath}${srcfile}" | tee "${depfile}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
exit 0
|
|
@ -74,10 +74,3 @@ noinst_HEADERS += \
|
||||||
../../framework/types.h \
|
../../framework/types.h \
|
||||||
../../framework/utf.h \
|
../../framework/utf.h \
|
||||||
../../ivis_opengl/GLee.h
|
../../ivis_opengl/GLee.h
|
||||||
|
|
||||||
# HACK Don't give make errors when switching between trunk and branches.
|
|
||||||
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file.
|
|
||||||
# Now with PD-ksh support.
|
|
||||||
fixbrokendependencies:
|
|
||||||
mkdir -p ".deps" ; for ext in c cpp ; do for a in `cd $(srcdir) ; echo *.$$ext` ; do fpref="`echo "$$a" | sed "s/\.$$ext//"`" ; pofile=".deps/$$fpref.Po" ; srcfile="$(srcdir)/$$a" ; if [ -e "$$srcfile" ] && ! grep -q "\b$$a\b" "$$pofile" 2> /dev/null ; then echo "$$fpref.o: $$srcfile" | tee "$$pofile" ; fi ; done ; done
|
|
||||||
all: fixbrokendependencies
|
|
||||||
|
|
|
@ -7,10 +7,3 @@ sdl_testapp_SOURCES = \
|
||||||
|
|
||||||
sdl_testapp_CPPFLAGS = $(LUA_CFLAGS) $(SDL_CFLAGS) $(CAIRO_CFLAGS) -DLIB_COMPILE=1
|
sdl_testapp_CPPFLAGS = $(LUA_CFLAGS) $(SDL_CFLAGS) $(CAIRO_CFLAGS) -DLIB_COMPILE=1
|
||||||
sdl_testapp_LDADD = $(OPENGL_LIBS) $(CAIRO_LIBS) $(SDL_LIBS) $(top_builddir)/src/libbetawidget.la $(LUA_LIBS)
|
sdl_testapp_LDADD = $(OPENGL_LIBS) $(CAIRO_LIBS) $(SDL_LIBS) $(top_builddir)/src/libbetawidget.la $(LUA_LIBS)
|
||||||
|
|
||||||
# HACK Don't give make errors when switching between trunk and branches.
|
|
||||||
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file.
|
|
||||||
# Now with PD-ksh support.
|
|
||||||
fixbrokendependencies:
|
|
||||||
mkdir -p ".deps" ; for ext in c cpp ; do for a in `cd $(srcdir) ; echo *.$$ext` ; do fpref="`echo "$$a" | sed "s/\.$$ext//"`" ; pofile=".deps/$$fpref.Po" ; srcfile="$(srcdir)/$$a" ; if [ -e "$$srcfile" ] && ! grep -q "\b$$a\b" "$$pofile" 2> /dev/null ; then echo "$$fpref.o: $$srcfile" | tee "$$pofile" ; fi ; done ; done
|
|
||||||
all: fixbrokendependencies
|
|
||||||
|
|
|
@ -17,10 +17,3 @@ libexceptionhandler_a_SOURCES = \
|
||||||
if MINGW32
|
if MINGW32
|
||||||
libexceptionhandler_a_SOURCES += exchndl.c
|
libexceptionhandler_a_SOURCES += exchndl.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# HACK Don't give make errors when switching between trunk and branches.
|
|
||||||
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file.
|
|
||||||
# Now with PD-ksh support.
|
|
||||||
fixbrokendependencies:
|
|
||||||
mkdir -p ".deps" ; for ext in c cpp ; do for a in `cd $(srcdir) ; echo *.$$ext` ; do fpref="`echo "$$a" | sed "s/\.$$ext//"`" ; pofile=".deps/$$fpref.Po" ; srcfile="$(srcdir)/$$a" ; if [ -e "$$srcfile" ] && ! grep -q "\b$$a\b" "$$pofile" 2> /dev/null ; then echo "$$fpref.o: $$srcfile" | tee "$$pofile" ; fi ; done ; done
|
|
||||||
all: fixbrokendependencies
|
|
||||||
|
|
|
@ -92,10 +92,3 @@ libframework_a_SOURCES = \
|
||||||
treap.c \
|
treap.c \
|
||||||
trig.c \
|
trig.c \
|
||||||
utf.c
|
utf.c
|
||||||
|
|
||||||
# HACK Don't give make errors when switching between trunk and branches.
|
|
||||||
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file.
|
|
||||||
# Now with PD-ksh support.
|
|
||||||
fixbrokendependencies:
|
|
||||||
mkdir -p ".deps" ; for ext in c cpp ; do for a in `cd $(srcdir) ; echo *.$$ext` ; do fpref="`echo "$$a" | sed "s/\.$$ext//"`" ; pofile=".deps/$$fpref.Po" ; srcfile="$(srcdir)/$$a" ; if [ -e "$$srcfile" ] && ! grep -q "\b$$a\b" "$$pofile" 2> /dev/null ; then echo "$$fpref.o: $$srcfile" | tee "$$pofile" ; fi ; done ; done
|
|
||||||
all: fixbrokendependencies
|
|
||||||
|
|
|
@ -43,10 +43,3 @@ libgamelib_a_SOURCES = \
|
||||||
|
|
||||||
libgamelib_a_LIBADD = $(top_builddir)/lib/ivis_opengl/libivis_opengl.a \
|
libgamelib_a_LIBADD = $(top_builddir)/lib/ivis_opengl/libivis_opengl.a \
|
||||||
$(top_builddir)/lib/ivis_common/libivis_common.a $(top_builddir)/lib/framework/libframework.a
|
$(top_builddir)/lib/ivis_common/libivis_common.a $(top_builddir)/lib/framework/libframework.a
|
||||||
|
|
||||||
# HACK Don't give make errors when switching between trunk and branches.
|
|
||||||
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file.
|
|
||||||
# Now with PD-ksh support.
|
|
||||||
fixbrokendependencies:
|
|
||||||
mkdir -p ".deps" ; for ext in c cpp ; do for a in `cd $(srcdir) ; echo *.$$ext` ; do fpref="`echo "$$a" | sed "s/\.$$ext//"`" ; pofile=".deps/$$fpref.Po" ; srcfile="$(srcdir)/$$a" ; if [ -e "$$srcfile" ] && ! grep -q "\b$$a\b" "$$pofile" 2> /dev/null ; then echo "$$fpref.o: $$srcfile" | tee "$$pofile" ; fi ; done ; done
|
|
||||||
all: fixbrokendependencies
|
|
||||||
|
|
|
@ -5,10 +5,3 @@ noinst_LIBRARIES = libiniparser.a
|
||||||
noinst_HEADERS = dictionary.h iniparser.h
|
noinst_HEADERS = dictionary.h iniparser.h
|
||||||
libiniparser_a_SOURCES = dictionary.c iniparser.c
|
libiniparser_a_SOURCES = dictionary.c iniparser.c
|
||||||
EXTRA_DIST = LICENSE AUTHORS
|
EXTRA_DIST = LICENSE AUTHORS
|
||||||
|
|
||||||
# HACK Don't give make errors when switching between trunk and branches.
|
|
||||||
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file.
|
|
||||||
# Now with PD-ksh support.
|
|
||||||
fixbrokendependencies:
|
|
||||||
mkdir -p ".deps" ; for ext in c cpp ; do for a in `cd $(srcdir) ; echo *.$$ext` ; do fpref="`echo "$$a" | sed "s/\.$$ext//"`" ; pofile=".deps/$$fpref.Po" ; srcfile="$(srcdir)/$$a" ; if [ -e "$$srcfile" ] && ! grep -q "\b$$a\b" "$$pofile" 2> /dev/null ; then echo "$$fpref.o: $$srcfile" | tee "$$pofile" ; fi ; done ; done
|
|
||||||
all: fixbrokendependencies
|
|
||||||
|
|
|
@ -32,10 +32,3 @@ libivis_common_a_SOURCES = \
|
||||||
png_util.c
|
png_util.c
|
||||||
|
|
||||||
libivis_common_a_LIBADD = $(top_builddir)/lib/framework/libframework.a
|
libivis_common_a_LIBADD = $(top_builddir)/lib/framework/libframework.a
|
||||||
|
|
||||||
# HACK Don't give make errors when switching between trunk and branches.
|
|
||||||
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file.
|
|
||||||
# Now with PD-ksh support.
|
|
||||||
fixbrokendependencies:
|
|
||||||
mkdir -p ".deps" ; for ext in c cpp ; do for a in `cd $(srcdir) ; echo *.$$ext` ; do fpref="`echo "$$a" | sed "s/\.$$ext//"`" ; pofile=".deps/$$fpref.Po" ; srcfile="$(srcdir)/$$a" ; if [ -e "$$srcfile" ] && ! grep -q "\b$$a\b" "$$pofile" 2> /dev/null ; then echo "$$fpref.o: $$srcfile" | tee "$$pofile" ; fi ; done ; done
|
|
||||||
all: fixbrokendependencies
|
|
||||||
|
|
|
@ -28,10 +28,3 @@ endif
|
||||||
|
|
||||||
libivis_opengl_a_LIBADD = $(top_builddir)/lib/ivis_common/libivis_common.a \
|
libivis_opengl_a_LIBADD = $(top_builddir)/lib/ivis_common/libivis_common.a \
|
||||||
$(top_builddir)/lib/framework/libframework.a
|
$(top_builddir)/lib/framework/libframework.a
|
||||||
|
|
||||||
# HACK Don't give make errors when switching between trunk and branches.
|
|
||||||
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file.
|
|
||||||
# Now with PD-ksh support.
|
|
||||||
fixbrokendependencies:
|
|
||||||
mkdir -p ".deps" ; for ext in c cpp ; do for a in `cd $(srcdir) ; echo *.$$ext` ; do fpref="`echo "$$a" | sed "s/\.$$ext//"`" ; pofile=".deps/$$fpref.Po" ; srcfile="$(srcdir)/$$a" ; if [ -e "$$srcfile" ] && ! grep -q "\b$$a\b" "$$pofile" 2> /dev/null ; then echo "$$fpref.o: $$srcfile" | tee "$$pofile" ; fi ; done ; done
|
|
||||||
all: fixbrokendependencies
|
|
||||||
|
|
|
@ -21,10 +21,3 @@ libnetplay_a_SOURCES = \
|
||||||
nettypes.cpp
|
nettypes.cpp
|
||||||
|
|
||||||
libnetplay_a_LIBADD = $(top_builddir)/lib/framework/libframework.a $(top_builddir)/lib/netplay/miniupnpc/libminiupnpc.a
|
libnetplay_a_LIBADD = $(top_builddir)/lib/framework/libframework.a $(top_builddir)/lib/netplay/miniupnpc/libminiupnpc.a
|
||||||
|
|
||||||
# HACK Don't give make errors when switching between trunk and branches.
|
|
||||||
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file.
|
|
||||||
# Now with PD-ksh support.
|
|
||||||
fixbrokendependencies:
|
|
||||||
mkdir -p ".deps" ; for ext in c cpp ; do for a in `cd $(srcdir) ; echo *.$$ext` ; do fpref="`echo "$$a" | sed "s/\.$$ext//"`" ; pofile=".deps/$$fpref.Po" ; srcfile="$(srcdir)/$$a" ; if [ -e "$$srcfile" ] && ! grep -q "\b$$a\b" "$$pofile" 2> /dev/null ; then echo "$$fpref.o: $$srcfile" | tee "$$pofile" ; fi ; done ; done
|
|
||||||
all: fixbrokendependencies
|
|
||||||
|
|
|
@ -29,10 +29,3 @@ libminiupnpc_a_SOURCES = \
|
||||||
upnperrors.c
|
upnperrors.c
|
||||||
|
|
||||||
EXTRA_DIST = LICENCE README
|
EXTRA_DIST = LICENCE README
|
||||||
|
|
||||||
# HACK Don't give make errors when switching between trunk and branches.
|
|
||||||
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file.
|
|
||||||
# Now with PD-ksh support.
|
|
||||||
fixbrokendependencies:
|
|
||||||
mkdir -p ".deps" ; for ext in c cpp ; do for a in `cd $(srcdir) ; echo *.$$ext` ; do fpref="`echo "$$a" | sed "s/\.$$ext//"`" ; pofile=".deps/$$fpref.Po" ; srcfile="$(srcdir)/$$a" ; if [ -e "$$srcfile" ] && ! grep -q "\b$$a\b" "$$pofile" 2> /dev/null ; then echo "$$fpref.o: $$srcfile" | tee "$$pofile" ; fi ; done ; done
|
|
||||||
all: fixbrokendependencies
|
|
||||||
|
|
|
@ -57,10 +57,3 @@ libscript_a_SOURCES = \
|
||||||
stack.c
|
stack.c
|
||||||
|
|
||||||
libscript_a_LIBADD = $(top_builddir)/lib/framework/libframework.a
|
libscript_a_LIBADD = $(top_builddir)/lib/framework/libframework.a
|
||||||
|
|
||||||
# HACK Don't give make errors when switching between trunk and branches.
|
|
||||||
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file.
|
|
||||||
# Now with PD-ksh support.
|
|
||||||
fixbrokendependencies:
|
|
||||||
mkdir -p ".deps" ; for ext in c cpp ; do for a in `cd $(srcdir) ; echo *.$$ext` ; do fpref="`echo "$$a" | sed "s/\.$$ext//"`" ; pofile=".deps/$$fpref.Po" ; srcfile="$(srcdir)/$$a" ; if [ -e "$$srcfile" ] && ! grep -q "\b$$a\b" "$$pofile" 2> /dev/null ; then echo "$$fpref.o: $$srcfile" | tee "$$pofile" ; fi ; done ; done
|
|
||||||
all: fixbrokendependencies
|
|
||||||
|
|
|
@ -10,10 +10,3 @@ noinst_HEADERS = \
|
||||||
libsequence_a_SOURCES = \
|
libsequence_a_SOURCES = \
|
||||||
sequence.c \
|
sequence.c \
|
||||||
timer.c
|
timer.c
|
||||||
|
|
||||||
# HACK Don't give make errors when switching between trunk and branches.
|
|
||||||
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file.
|
|
||||||
# Now with PD-ksh support.
|
|
||||||
fixbrokendependencies:
|
|
||||||
mkdir -p ".deps" ; for ext in c cpp ; do for a in `cd $(srcdir) ; echo *.$$ext` ; do fpref="`echo "$$a" | sed "s/\.$$ext//"`" ; pofile=".deps/$$fpref.Po" ; srcfile="$(srcdir)/$$a" ; if [ -e "$$srcfile" ] && ! grep -q "\b$$a\b" "$$pofile" 2> /dev/null ; then echo "$$fpref.o: $$srcfile" | tee "$$pofile" ; fi ; done ; done
|
|
||||||
all: fixbrokendependencies
|
|
||||||
|
|
|
@ -27,10 +27,3 @@ libsound_a_SOURCES = \
|
||||||
|
|
||||||
libsound_a_LIBADD = $(top_builddir)/lib/gamelib/libgamelib.a \
|
libsound_a_LIBADD = $(top_builddir)/lib/gamelib/libgamelib.a \
|
||||||
$(top_builddir)/lib/framework/libframework.a
|
$(top_builddir)/lib/framework/libframework.a
|
||||||
|
|
||||||
# HACK Don't give make errors when switching between trunk and branches.
|
|
||||||
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file.
|
|
||||||
# Now with PD-ksh support.
|
|
||||||
fixbrokendependencies:
|
|
||||||
mkdir -p ".deps" ; for ext in c cpp ; do for a in `cd $(srcdir) ; echo *.$$ext` ; do fpref="`echo "$$a" | sed "s/\.$$ext//"`" ; pofile=".deps/$$fpref.Po" ; srcfile="$(srcdir)/$$a" ; if [ -e "$$srcfile" ] && ! grep -q "\b$$a\b" "$$pofile" 2> /dev/null ; then echo "$$fpref.o: $$srcfile" | tee "$$pofile" ; fi ; done ; done
|
|
||||||
all: fixbrokendependencies
|
|
||||||
|
|
|
@ -29,10 +29,3 @@ libwidget_a_SOURCES = \
|
||||||
|
|
||||||
libwidget_a_LIBADD = $(top_builddir)/lib/ivis_opengl/libivis_opengl.a \
|
libwidget_a_LIBADD = $(top_builddir)/lib/ivis_opengl/libivis_opengl.a \
|
||||||
$(top_builddir)/lib/ivis_common/libivis_common.a $(top_builddir)/lib/framework/libframework.a
|
$(top_builddir)/lib/ivis_common/libivis_common.a $(top_builddir)/lib/framework/libframework.a
|
||||||
|
|
||||||
# HACK Don't give make errors when switching between trunk and branches.
|
|
||||||
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file.
|
|
||||||
# Now with PD-ksh support.
|
|
||||||
fixbrokendependencies:
|
|
||||||
mkdir -p ".deps" ; for ext in c cpp ; do for a in `cd $(srcdir) ; echo *.$$ext` ; do fpref="`echo "$$a" | sed "s/\.$$ext//"`" ; pofile=".deps/$$fpref.Po" ; srcfile="$(srcdir)/$$a" ; if [ -e "$$srcfile" ] && ! grep -q "\b$$a\b" "$$pofile" 2> /dev/null ; then echo "$$fpref.o: $$srcfile" | tee "$$pofile" ; fi ; done ; done
|
|
||||||
all: fixbrokendependencies
|
|
||||||
|
|
|
@ -305,10 +305,3 @@ warzone2100_LDADD += $(LTLIBINTL) $(SDL_LIBS) $(PHYSFS_LIBS) $(PNG_LIBS) $(OGGVO
|
||||||
if MINGW32
|
if MINGW32
|
||||||
warzone2100_LDADD += $(top_builddir)/win32/warzone2100.o $(WIN32_LIBS)
|
warzone2100_LDADD += $(top_builddir)/win32/warzone2100.o $(WIN32_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# HACK Don't give make errors when switching between trunk and branches.
|
|
||||||
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file.
|
|
||||||
# Now with PD-ksh support.
|
|
||||||
fixbrokendependencies:
|
|
||||||
mkdir -p ".deps" ; for ext in c cpp ; do for a in `cd $(srcdir) ; echo *.$$ext` ; do fpref="`echo "$$a" | sed "s/\.$$ext//"`" ; pofile=".deps/$$fpref.Po" ; srcfile="$(srcdir)/$$a" ; if [ -e "$$srcfile" ] && ! grep -q "\b$$a\b" "$$pofile" 2> /dev/null ; then echo "$$fpref.o: $$srcfile" | tee "$$pofile" ; fi ; done ; done
|
|
||||||
all: fixbrokendependencies
|
|
||||||
|
|
Loading…
Reference in New Issue