]> git.saurik.com Git - apt.git/commitdiff
Upgraded to eg++ 1.1 and libstdc++2.9
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:51:08 +0000 (16:51 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:51:08 +0000 (16:51 +0000)
Author: jgg
Date: 1998-10-20 04:33:11 GMT
Upgraded to eg++ 1.1 and libstdc++2.9

Makefile
README.make [new file with mode: 0644]
apt-pkg/acquire-worker.cc
apt-pkg/algorithms.cc
apt-pkg/contrib/fileutl.cc
apt-pkg/pkgcache.cc
apt-pkg/sourcelist.cc
buildlib/defaults.mak
cmdline/apt-get.cc

index e7990fb9010fa6d8faa14fb7c3c2b85580f20daf..bc623e24698de5730a8f3f4aa779a194834835ae 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,3 +12,6 @@ all headers library clean veryclean binary program doc:
        $(MAKE) -C deity $@
        $(MAKE) -C gui $@
        $(MAKE) -C doc $@
+
+.PHONY: maintainer-clean dist-clean distclean pristine sanity 
+maintainer-clean dist-clean distclean pristine sanity: veryclean
diff --git a/README.make b/README.make
new file mode 100644 (file)
index 0000000..bee2d04
--- /dev/null
@@ -0,0 +1,79 @@
+The Make System
+~~~ ~~~~ ~~~~~~
+To compile this program you require GNU Make. In fact you probably need
+GNU Make 3.76.1 or newer. The makefiles contained make use of many 
+GNU Make specific features and will not run on other makes.
+
+The make system has a number of interesting properties that are not found
+in other systems such as automake or the GNU makefile standards. In
+general some semblance of expectedness is kept so as not to be too
+surprising. Basically the following will work as expected:
+
+   ./configure
+   make
+ or
+   cd build
+   ../configure
+   make
+
+There are a number of other things that are possible that may make software
+development and software packaging simpler. The first of these is the
+environment.mak file. When configure is run it creates an environment.mak
+file in the build directory. This contains -all- configurable parameters
+for all of the make files in all of the subdirectories. Changing one
+of these parameters will have an immediate effect. The use of makefile.in 
+and configure substitutions across build makefiles is not used at all.
+
+Furthermore, the make system runs with a current directory equal to the
+source directory irregardless of the destination directory. This means
+#include "" and #include <> work as epected and more importantly
+running 'make' in the source directory will work as expected. The
+environment variable or make parameter 'BUILD' sets the build directory.
+It may be an absolute path or a path relative to the top level directory.
+By default build/ will be used with a fall back to ./ This means
+you can get all the advantages of a build directory without having to
+cd into it to edit your source code!
+
+The make system also performs dependency generation on the fly as the
+compiler runs. This is extremely fast and accurate. There is however
+one failure condition that occures when a header file is erased. In
+this case you should run make clean to purge the .o and .d files to
+rebuild.
+
+The final significant deviation from normal make practicies is 
+in how the build directory is managed. It is not mearly a mirror of
+the source directory but is logically divided in the following manner
+   bin/
+     methods/
+   doc/
+     examples/
+   include/
+     apt-pkg/
+     deity/
+   obj/
+     apt-pkg/
+     deity/
+     cmndline/
+     [...]
+Only .o and .d files are placed in the obj/ subdirectory. The final compiled
+binaries are placed in bin, published headers for inter-component linking
+are placed in include/ and documentation is generated into doc/. This means
+all runnable programs are within the bin/ directory a huge benifit for
+debugging inter-program relationships. The .so files are also placed in
+bin/ for simplicity.
+
+Using the makefiles
+~~~~~ ~~~ ~~~~~~~~~
+The makefiles for the components are really simple. The complexity is hidden
+within the buildlib/ directory. Each makefile defines a set of make variables
+for the bit it is going to make then includes a makefile fragment from
+the buildlib/. This fragment generates the necessary rules based on the
+originally defined variables. This process can be repeated as many times as
+necessary for as many programs or libraries as are in the directory.
+
+Many of the make fragments have some useful properties involving sub
+directories and other interesting features. They are more completely 
+described in the fragment code in buildlib. Some tips on writing fragments
+are included in buildlib/defaults.mak
+
+Jason
index 5bd30b7b1e82c678d3938560b24b9a70e6dcd337..688c5e2202d5f5e8bccf0b427ebd52eb829a2bae 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: acquire-worker.cc,v 1.2 1998/10/20 02:39:13 jgg Exp $
+// $Id: acquire-worker.cc,v 1.3 1998/10/20 04:33:12 jgg Exp $
 /* ######################################################################
 
    Acquire Worker 
@@ -23,6 +23,7 @@
 
 #include <unistd.h>
 #include <signal.h>
+#include <wait.h>
                                                                        /*}}}*/
 
 // Worker::Worker - Constructor for Queue startup                      /*{{{*/
index 755474e151c0920eb4ee5b9f0db00ac2302ef185..185e3400e82ec1f257b95a58b2c56bc17d78cc31 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: algorithms.cc,v 1.6 1998/10/20 02:39:17 jgg Exp $
+// $Id: algorithms.cc,v 1.7 1998/10/20 04:33:13 jgg Exp $
 /* ######################################################################
 
    Algorithms - A set of misc algorithms
@@ -904,7 +904,6 @@ bool pkgProblemResolver::ResolveByKeep()
         
         // Look at all the possible provides on this package
         pkgCache::Version **VList = End.AllTargets();
-        bool Done = false;
         for (pkgCache::Version **V = VList; *V != 0; V++)
         {
            pkgCache::VerIterator Ver(Cache,*V);
index cc0363da5f3a7cb236477f148473bedd66e409ca..bfc674c62a58b0c2ca01355d7cb75d1cd834c38b 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: fileutl.cc,v 1.9 1998/10/20 02:39:28 jgg Exp $
+// $Id: fileutl.cc,v 1.10 1998/10/20 04:33:16 jgg Exp $
 /* ######################################################################
    
    File Utilities
@@ -137,7 +137,7 @@ void SetCloseExec(int Fd,bool Close)
 void SetNonBlock(int Fd,bool Block)
 {   
    int Flags = fcntl(Fd,F_GETFL);
-   if (fcntl(Fd,F_SETFL,(Block == false)?0:O_NONBLOCK) != 0)
+   if (fcntl(Fd,F_SETFL,(Flags  & ~O_NONBLOCK) | (Block == false)?0:O_NONBLOCK) != 0)
    {
       cerr << "FATAL -> Could not set non-blocking flag " << strerror(errno) << endl;
       exit(100);
index 13e33dc4ffc8f30ecacfa53c7614f37b23e30441..a73cb410b1e2637137f78e11986feeca36589ba3 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: pkgcache.cc,v 1.11 1998/10/08 05:05:05 jgg Exp $
+// $Id: pkgcache.cc,v 1.12 1998/10/20 04:33:14 jgg Exp $
 /* ######################################################################
    
    Package Cache - Accessor code for the cache
@@ -346,7 +346,7 @@ pkgCache::Version **pkgCache::DepIterator::AllTargets()
 const char *pkgCache::DepIterator::CompType()
 {
    const char *Ops[] = {"","<=",">=","<",">","=","!="};
-   if ((Dep->CompareOp & 0xF) < sizeof(Ops))
+   if ((unsigned)(Dep->CompareOp & 0xF) < sizeof(Ops))
       return Ops[Dep->CompareOp & 0xF];
    return "";   
 }
index e6200d3be29ed6e438d80ac91e0f5be67a0b2b23..c3fb5642f3a8ea66396dd65013162f61f7d8a19f 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: sourcelist.cc,v 1.7 1998/10/20 02:39:24 jgg Exp $
+// $Id: sourcelist.cc,v 1.8 1998/10/20 04:33:15 jgg Exp $
 /* ######################################################################
 
    List of Sources
@@ -114,7 +114,7 @@ bool pkgSourceList::Read(string File)
    debugging. */
 ostream &operator <<(ostream &O,pkgSourceList::Item &Itm)
 {
-   O << Itm.Type << ' ' << Itm.URI << ' ' << Itm.Dist << ' ' << Itm.Section;
+   O << (int)Itm.Type << ' ' << Itm.URI << ' ' << Itm.Dist << ' ' << Itm.Section;
    return O;
 }
                                                                        /*}}}*/
index c9a501e8458c42835250f45eee74a2542512decf..c6a2c15d779f7a2008a1a5ebedb49c0fba3bce4c 100644 (file)
 
 # Search for the build directory
 ifdef BUILD
-BUILD_POSSIBLE $(BUILD)
+BUILD_POSSIBLE := $(BUILD) $(BASE)/$(BUILD)
 else
-BUILD_POSSIBLE = $(BASE) $(BASE)/build
+BUILD_POSSIBLE := $(BASE) $(BASE)/build
 endif
 
-BUILD:= $(foreach i,$(BUILD_POSSIBLE),$(wildcard $(i)/environment.mak))
-BUILD:= $(patsubst %/,%,$(firstword $(dir $(BUILD))))
+BUILDX:= $(foreach i,$(BUILD_POSSIBLE),$(wildcard $(i)/environment.mak*))
+BUILDX:= $(patsubst %/,%,$(firstword $(dir $(BUILDX))))
 
-ifeq ($(words $(BUILD)),0)
+ifeq ($(words $(BUILDX)),0)
 error-all:
        echo Can't find the build directory in $(BUILD_POSSIBLE) -- use BUILD=
 endif
 
+override BUILD := $(BUILDX)
+
 # Base definitions
 INCLUDE := $(BUILD)/include
 BIN := $(BUILD)/bin
@@ -77,6 +79,7 @@ LDFLAGS+= -L$(LIB)
 # Phony rules. Other things hook these by appending to the dependency
 # list
 .PHONY: headers library clean veryclean all binary program doc
+.PHONY: maintainer-clean dist-clean distclean pristine sanity
 all: binary doc
 binary: library program
 maintainer-clean dist-clean distclean pristine sanity: veryclean
index 1bf87349bdabc43d8b9e5b2ad1102a7fe25f0c0e..4f8de001f0a415f867b328fa3ae19906adf9adf5 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: apt-get.cc,v 1.3 1998/10/19 23:45:36 jgg Exp $
+// $Id: apt-get.cc,v 1.4 1998/10/20 04:33:18 jgg Exp $
 /* ######################################################################
    
    apt-get - Cover for dpkg
@@ -242,7 +242,7 @@ void ShowEssential(ostream &out,pkgDepCache &Dep)
    pkgCache::PkgIterator I = Dep.PkgBegin();
    string List;
    bool *Added = new bool[Dep.HeaderP->PackageCount];
-   for (int I = 0; I != Dep.HeaderP->PackageCount; I++)
+   for (unsigned int I = 0; I != Dep.HeaderP->PackageCount; I++)
       Added[I] = false;
    
    for (;I.end() != true; I++)
@@ -460,7 +460,6 @@ bool DoUpgrade(CommandLine &CmdL)
       return false;
 
    // Do the upgrade
-   pkgProblemResolver Resolve(Cache);
    if (pkgAllUpgrade(Cache) == false)
    {
       ShowBroken(c1out,Cache);