summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:53:31 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:53:31 +0000
commitf760b7d2124f9b4498b62c481f08e56cc617e675 (patch)
tree287632c077177adb69b319c1fa44204f784a7d9b
parent1fcbfcb8ba78224fd0e4d532d4fa976f0ea00fef (diff)
Fixed make system to rebuild binaries when shlib versio...
Author: jgg Date: 1999-04-12 04:28:46 GMT Fixed make system to rebuild binaries when shlib version changes
-rw-r--r--buildlib/program.mak5
-rw-r--r--cmdline/makefile4
-rw-r--r--methods/makefile6
-rw-r--r--test/makefile3
4 files changed, 17 insertions, 1 deletions
diff --git a/buildlib/program.mak b/buildlib/program.mak
index 9a19a261f..fe0d30de3 100644
--- a/buildlib/program.mak
+++ b/buildlib/program.mak
@@ -6,6 +6,8 @@
# $(SOURCE) - The source code to use
# $(PROGRAM) - The name of the program
# $(SLIBS) - Shared libs to link against
+# $(LIB_MAKES) - Shared libary make files to depend on - to ensure we get
+# remade when the shared library version increases.
# See defaults.mak for information about LOCAL
@@ -15,6 +17,7 @@ $(LOCAL)-OBJS := $(addprefix $(OBJ)/,$(addsuffix .o,$(notdir $(basename $(SOURCE
$(LOCAL)-DEP := $(addprefix $(DEP)/,$(addsuffix .o.d,$(notdir $(basename $(SOURCE)))))
$(LOCAL)-BIN := $(BIN)/$(PROGRAM)
$(LOCAL)-SLIBS := $(SLIBS)
+$(LOCAL)-MKS := $(addprefix $(BASE)/,$(LIB_MAKES))
# Install the command hooks
program: $(BIN)/$(PROGRAM)
@@ -29,7 +32,7 @@ veryclean/$(LOCAL): clean/$(LOCAL)
-rm -f $($(@F)-BIN)
# The binary build rule
-$($(LOCAL)-BIN): $($(LOCAL)-OBJS)
+$($(LOCAL)-BIN): $($(LOCAL)-OBJS) $($(LOCAL)-MKS)
echo Building program $@
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(LFLAGS) -o $@ $(filter %.o,$^) $($(@F)-SLIBS) $(LEFLAGS)
diff --git a/cmdline/makefile b/cmdline/makefile
index c3a4d81d9..861976ec7 100644
--- a/cmdline/makefile
+++ b/cmdline/makefile
@@ -8,23 +8,27 @@ include ../buildlib/defaults.mak
# The apt-cache program
PROGRAM=apt-cache
SLIBS = -lapt-pkg
+LIB_MAKES = apt-pkg/makefile
SOURCE = apt-cache.cc
include $(PROGRAM_H)
# The apt-get program
PROGRAM=apt-get
SLIBS = -lapt-pkg
+LIB_MAKES = apt-pkg/makefile
SOURCE = apt-get.cc acqprogress.cc
include $(PROGRAM_H)
# The apt-config program
PROGRAM=apt-config
SLIBS = -lapt-pkg
+LIB_MAKES = apt-pkg/makefile
SOURCE = apt-config.cc
include $(PROGRAM_H)
# The apt-cdrom program
PROGRAM=apt-cdrom
SLIBS = -lapt-pkg
+LIB_MAKES = apt-pkg/makefile
SOURCE = apt-cdrom.cc
include $(PROGRAM_H)
diff --git a/methods/makefile b/methods/makefile
index 00fec2bc8..dc6b88780 100644
--- a/methods/makefile
+++ b/methods/makefile
@@ -9,35 +9,41 @@ BIN := $(BIN)/methods
# The file method
PROGRAM=file
SLIBS = -lapt-pkg
+LIB_MAKES = apt-pkg/makefile
SOURCE = file.cc
include $(PROGRAM_H)
# The copy method
PROGRAM=copy
SLIBS = -lapt-pkg
+LIB_MAKES = apt-pkg/makefile
SOURCE = copy.cc
include $(PROGRAM_H)
# The gzip method
PROGRAM=gzip
SLIBS = -lapt-pkg
+LIB_MAKES = apt-pkg/makefile
SOURCE = gzip.cc
include $(PROGRAM_H)
# The cdrom method
PROGRAM=cdrom
SLIBS = -lapt-pkg
+LIB_MAKES = apt-pkg/makefile
SOURCE = cdrom.cc
include $(PROGRAM_H)
# The http method
PROGRAM=http
SLIBS = -lapt-pkg
+LIB_MAKES = apt-pkg/makefile
SOURCE = http.cc
include $(PROGRAM_H)
# The ftp method
PROGRAM=ftp
SLIBS = -lapt-pkg
+LIB_MAKES = apt-pkg/makefile
SOURCE = ftp.cc
include $(PROGRAM_H)
diff --git a/test/makefile b/test/makefile
index eae6230d0..49a501d3d 100644
--- a/test/makefile
+++ b/test/makefile
@@ -14,17 +14,20 @@ include $(PROGRAM_H)
# Scratch program to test incomplete code fragments in
PROGRAM=scratch-test
SLIBS = -lapt-pkg
+LIB_MAKES = apt-pkg/makefile
SOURCE = scratch.cc
include $(PROGRAM_H)
# Version compare tester
PROGRAM=versiontest
SLIBS = -lapt-pkg
+LIB_MAKES = apt-pkg/makefile
SOURCE = versiontest.cc
include $(PROGRAM_H)
# Version compare tester
PROGRAM=srcrfind
SLIBS = -lapt-pkg
+LIB_MAKES = apt-pkg/makefile
SOURCE = srcrfind.cc
include $(PROGRAM_H)