Просмотр исходного кода

Upgraded to eg++ 1.1 and libstdc++2.9
Author: jgg
Date: 1998-10-20 04:33:11 GMT
Upgraded to eg++ 1.1 and libstdc++2.9

Arch Librarian лет назад: 22
Родитель
Сommit
93641593ca

+ 3 - 0
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

+ 79 - 0
README.make

@@ -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

+ 2 - 1
apt-pkg/acquire-worker.cc

@@ -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			/*{{{*/

+ 1 - 2
apt-pkg/algorithms.cc

@@ -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);

+ 2 - 2
apt-pkg/contrib/fileutl.cc

@@ -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);

+ 2 - 2
apt-pkg/pkgcache.cc

@@ -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 "";	 
 }

+ 2 - 2
apt-pkg/sourcelist.cc

@@ -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;
 }
 									/*}}}*/

+ 8 - 5
buildlib/defaults.mak

@@ -30,19 +30,21 @@
 
 # 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

+ 2 - 3
cmdline/apt-get.cc

@@ -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);