make: Better (hopefully) hack to fix broken dependency files.
Probably closes ticket:1590. git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9817 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
5fc308b749
commit
e1bfee9a4c
|
@ -96,10 +96,3 @@ EXTRA_DIST= \
|
|||
macosx/Resources/wzlocal/zh_CN.lproj/InfoPlist.strings \
|
||||
macosx/Resources/wzlocal/zh_TW.lproj/InfoPlist.strings \
|
||||
macosx/Warzone.xcodeproj/project.pbxproj
|
||||
|
||||
# HACK Don't give make errors when switching between trunk and branches.
|
||||
# Now with PD-ksh support.
|
||||
all: fixdeps
|
||||
fixdeps:
|
||||
cd "$(top_srcdir)/src" ; mkdir -p "$(abs_top_builddir)/src/.deps" ; for ext in c cpp ; do for a in *.$$ext ; do grep -q "\b$$a\b" "$(abs_top_builddir)/src/.deps/`echo "$$a" | sed s/\.$$ext/.Po/`" 2> /dev/null || echo "`echo "$$a" | sed s/\.$$ext/.o/`: ../$(top_srcdir)/src/$$a" | tee "$(abs_top_builddir)/src/.deps/`echo "$$a" | sed s/\.$$ext/.Po/`" ; done ; done
|
||||
cd "$(top_srcdir)/lib/netplay" ; mkdir -p "$(abs_top_builddir)/lib/netplay/.deps" ; for ext in c cpp ; do for a in *.$$ext ; do grep -q "\b$$a\b" "$(abs_top_builddir)/lib/netplay/.deps/`echo "$$a" | sed s/\.$$ext/.Po/`" 2> /dev/null || echo "`echo "$$a" | sed s/\.$$ext/.o/`: ../$(top_srcdir)/lib/netplay/$$a" | tee "$(abs_top_builddir)/lib/netplay/.deps/`echo "$$a" | sed s/\.$$ext/.Po/`" ; done ; done
|
||||
|
|
|
@ -16,3 +16,10 @@ libnetplay_a_SOURCES = \
|
|||
nettypes.c
|
||||
|
||||
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
|
||||
|
|
|
@ -305,3 +305,10 @@ warzone2100_LDADD += $(LTLIBINTL) $(SDL_LIBS) $(PHYSFS_LIBS) $(PNG_LIBS) $(OGGVO
|
|||
if MINGW32
|
||||
warzone2100_LDADD += $(top_builddir)/win32/warzone2100.o $(WIN32_LIBS)
|
||||
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