From d393a67a5fa2d50f3ec83bf2568bca597da6cf0e Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 14 Apr 2006 03:56:31 +0000 Subject: [PATCH] Don't hardcode the output directory --- Makefile.in | 4 ++-- build-scripts/makedep.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile.in b/Makefile.in index dca3e4fa4..07ae0961e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -61,11 +61,11 @@ $(objects): .PHONY: all depend install install-bin install-hdrs install-lib install-data install-man uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data uninstall-man clean distclean dist depend: - @SOURCES="$(SOURCES)" INCLUDE="$(INCLUDE)" objects="$(objects)" output="$(depend)" \ + @SOURCES="$(SOURCES)" INCLUDE="$(INCLUDE)" output="$(depend)" \ $(SHELL) $(auxdir)/makedep.sh @for src in $(SDLMAIN_SOURCES); do \ obj=`echo $$src | sed -e 's|.*/||' -e 's|\.[^\.]*$$|.o|'`; \ - echo "$(objects)/$$obj: $$src" >>$(depend); \ + echo "\$$(objects)/$$obj: $$src" >>$(depend); \ echo " \$$(CC) \$$(CFLAGS) \$$(EXTRA_CFLAGS) -c $$src -o \$$@" >>$(depend); \ done diff --git a/build-scripts/makedep.sh b/build-scripts/makedep.sh index 6bf2aaeb8..cebc36f1c 100755 --- a/build-scripts/makedep.sh +++ b/build-scripts/makedep.sh @@ -3,8 +3,8 @@ # Generate dependencies from a list of source files # Check to make sure our environment variables are set -if test x"$INCLUDE" = x -o x"$SOURCES" = x -o x"$objects" = x -o x"$output" = x; then - echo "SOURCES, INCLUDE, objects, and output needs to be set" +if test x"$INCLUDE" = x -o x"$SOURCES" = x -o x"$output" = x; then + echo "SOURCES, INCLUDE, and output needs to be set" exit 1 fi cache_prefix=".#$$" @@ -41,8 +41,8 @@ search_deps() for src in $SOURCES do echo "Generating dependencies for $src" ext=`echo $src | sed 's|.*\.\(.*\)|\1|'` - obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|$objects/\1.lo|g"` - echo "$obj: $src \\" >>${output}.new + obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|\1.lo|g"` + echo "\$(objects)/$obj: $src \\" >>${output}.new search_deps $src | sort | uniq >>${output}.new case $ext in c) cat >>${output}.new <<__EOF__