From c474d368a13c8829f475f4d56b6c44bea90b5a7e Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Sun, 23 Oct 2011 17:48:10 -0700 Subject: [PATCH] Use less conflicting filenames --- ASTNode.h | 2 +- ASTree.cpp | 2 +- Makefile | 43 +++++------------------ bytecode.cpp | 2 +- bytecode.h | 4 +-- code.cpp => pyc_code.cpp | 4 +-- code.h => pyc_code.h | 4 +-- module.cpp => pyc_module.cpp | 2 +- module.h => pyc_module.h | 2 +- numeric.cpp => pyc_numeric.cpp | 4 +-- numeric.h => pyc_numeric.h | 2 +- object.cpp => pyc_object.cpp | 11 +++--- object.h => pyc_object.h | 0 sequence.cpp => pyc_sequence.cpp | 4 +-- sequence.h => pyc_sequence.h | 2 +- string.cpp => pyc_string.cpp | 4 +-- string.h => pyc_string.h | 2 +- pycdas.cpp | 4 +-- pycdas.vcproj | 60 ++++++++++++++++---------------- pycdc.vcproj | 60 ++++++++++++++++---------------- 20 files changed, 95 insertions(+), 123 deletions(-) rename code.cpp => pyc_code.cpp (98%) rename code.h => pyc_code.h (98%) rename module.cpp => pyc_module.cpp (99%) rename module.h => pyc_module.h (98%) rename numeric.cpp => pyc_numeric.cpp (98%) rename numeric.h => pyc_numeric.h (99%) rename object.cpp => pyc_object.cpp (96%) rename object.h => pyc_object.h (100%) rename sequence.cpp => pyc_sequence.cpp (98%) rename sequence.h => pyc_sequence.h (99%) rename string.cpp => pyc_string.cpp (98%) rename string.h => pyc_string.h (96%) diff --git a/ASTNode.h b/ASTNode.h index 78c4565..21db5c1 100644 --- a/ASTNode.h +++ b/ASTNode.h @@ -1,7 +1,7 @@ #ifndef _PYC_ASTNODE_H #define _PYC_ASTNODE_H -#include "module.h" +#include "pyc_module.h" #include /* Similar interface to PycObject, so PycRef can work on it... * diff --git a/ASTree.cpp b/ASTree.cpp index 59369d2..4441dde 100644 --- a/ASTree.cpp +++ b/ASTree.cpp @@ -1,7 +1,7 @@ #include "ASTree.h" #include "FastStack.h" +#include "pyc_numeric.h" #include "bytecode.h" -#include "numeric.h" /* Use this to determine if an error occurred (and therefore, if we should * avoid cleaning the output tree) */ diff --git a/Makefile b/Makefile index 7fc8afc..d169325 100644 --- a/Makefile +++ b/Makefile @@ -5,14 +5,14 @@ LDFLAGS = #LDFLAGS += -lgcov COMMON = \ - out/module.o \ out/data.o \ out/bytecode.o \ - out/object.o \ - out/numeric.o \ - out/code.o \ - out/sequence.o \ - out/string.o \ + out/pyc_module.o \ + out/pyc_object.o \ + out/pyc_numeric.o \ + out/pyc_code.o \ + out/pyc_sequence.o \ + out/pyc_string.o \ out/ASTree.o \ out/ASTNode.o \ @@ -79,35 +79,8 @@ bin/pycdas: pycdas.cpp $(COMMON) $(BYTES) bin/pycdc: pycdc.cpp $(COMMON) $(BYTES) $(CXX) $(CXXFLAGS) $(LDFLAGS) $(COMMON) $(BYTES) pycdc.cpp -o $@ -out/module.o: module.h module.cpp - $(CXX) $(CXXFLAGS) -c module.cpp -o $@ - -out/data.o: data.h data.cpp - $(CXX) $(CXXFLAGS) -c data.cpp -o $@ - -out/bytecode.o: bytecode.h bytecode.cpp - $(CXX) $(CXXFLAGS) -c bytecode.cpp -o $@ - -out/object.o: object.h object.cpp - $(CXX) $(CXXFLAGS) -c object.cpp -o $@ - -out/numeric.o: numeric.h numeric.cpp - $(CXX) $(CXXFLAGS) -c numeric.cpp -o $@ - -out/code.o: code.h code.cpp - $(CXX) $(CXXFLAGS) -c code.cpp -o $@ - -out/sequence.o: sequence.h sequence.cpp - $(CXX) $(CXXFLAGS) -c sequence.cpp -o $@ - -out/string.o: string.h string.cpp - $(CXX) $(CXXFLAGS) -c string.cpp -o $@ - -out/ASTree.o: ASTree.h ASTree.cpp - $(CXX) $(CXXFLAGS) -c ASTree.cpp -o $@ - -out/ASTNode.o: ASTNode.h ASTNode.cpp - $(CXX) $(CXXFLAGS) -c ASTNode.cpp -o $@ +out/%.o: %.cpp %.h + $(CXX) $(CXXFLAGS) -c $< -o $@ out/python_%.o: bytes/python_%.cpp $(CXX) $(CXXFLAGS) -c $< -o $@ diff --git a/bytecode.cpp b/bytecode.cpp index 610ba45..e29e804 100644 --- a/bytecode.cpp +++ b/bytecode.cpp @@ -1,5 +1,5 @@ +#include "pyc_numeric.h" #include "bytecode.h" -#include "numeric.h" #ifdef _MSC_VER #define snprintf _snprintf diff --git a/bytecode.h b/bytecode.h index 4f71523..fe09dbb 100644 --- a/bytecode.h +++ b/bytecode.h @@ -1,5 +1,5 @@ -#include "code.h" -#include "module.h" +#include "pyc_code.h" +#include "pyc_module.h" #include "data.h" namespace Pyc { diff --git a/code.cpp b/pyc_code.cpp similarity index 98% rename from code.cpp rename to pyc_code.cpp index 1c7c547..199ec57 100644 --- a/code.cpp +++ b/pyc_code.cpp @@ -1,6 +1,6 @@ -#include "code.h" +#include "pyc_code.h" +#include "pyc_module.h" #include "data.h" -#include "module.h" void PycCode::load(PycData* stream, PycModule* mod) { diff --git a/code.h b/pyc_code.h similarity index 98% rename from code.h rename to pyc_code.h index cb2e1f0..4d295ff 100644 --- a/code.h +++ b/pyc_code.h @@ -1,8 +1,8 @@ #ifndef _PYC_CODE_H #define _PYC_CODE_H -#include "sequence.h" -#include "string.h" +#include "pyc_sequence.h" +#include "pyc_string.h" class PycCode : public PycObject { public: diff --git a/module.cpp b/pyc_module.cpp similarity index 99% rename from module.cpp rename to pyc_module.cpp index ae2a87e..fff8b34 100644 --- a/module.cpp +++ b/pyc_module.cpp @@ -1,4 +1,4 @@ -#include "module.h" +#include "pyc_module.h" #include "data.h" PycModule::PycModule() diff --git a/module.h b/pyc_module.h similarity index 98% rename from module.h rename to pyc_module.h index 98bf336..1c2bc20 100644 --- a/module.h +++ b/pyc_module.h @@ -1,7 +1,7 @@ #ifndef _PYC_MODULE_H #define _PYC_MODULE_H -#include "code.h" +#include "pyc_code.h" #include enum PycMagic { diff --git a/numeric.cpp b/pyc_numeric.cpp similarity index 98% rename from numeric.cpp rename to pyc_numeric.cpp index 3b624b3..25a6419 100644 --- a/numeric.cpp +++ b/pyc_numeric.cpp @@ -1,6 +1,6 @@ -#include "numeric.h" +#include "pyc_numeric.h" +#include "pyc_module.h" #include "data.h" -#include "module.h" #include #ifdef _MSC_VER diff --git a/numeric.h b/pyc_numeric.h similarity index 99% rename from numeric.h rename to pyc_numeric.h index 7beaf0b..366d9ab 100644 --- a/numeric.h +++ b/pyc_numeric.h @@ -1,7 +1,7 @@ #ifndef _PYC_NUMERIC_H #define _PYC_NUMERIC_H -#include "object.h" +#include "pyc_object.h" #include #include diff --git a/object.cpp b/pyc_object.cpp similarity index 96% rename from object.cpp rename to pyc_object.cpp index 3fdc3cf..f198fef 100644 --- a/object.cpp +++ b/pyc_object.cpp @@ -1,10 +1,9 @@ -#include "object.h" - -#include +#include "pyc_object.h" +#include "pyc_module.h" +#include "pyc_numeric.h" +#include "pyc_code.h" #include "data.h" -#include "module.h" -#include "numeric.h" -#include "code.h" +#include PycRef Pyc_NULL = (PycObject*)0; PycRef Pyc_None = new PycObject(PycObject::TYPE_NONE); diff --git a/object.h b/pyc_object.h similarity index 100% rename from object.h rename to pyc_object.h diff --git a/sequence.cpp b/pyc_sequence.cpp similarity index 98% rename from sequence.cpp rename to pyc_sequence.cpp index 076755c..2d638c9 100644 --- a/sequence.cpp +++ b/pyc_sequence.cpp @@ -1,6 +1,6 @@ -#include "sequence.h" +#include "pyc_sequence.h" +#include "pyc_module.h" #include "data.h" -#include "module.h" /* PycTuple */ void PycTuple::load(PycData* stream, PycModule* mod) diff --git a/sequence.h b/pyc_sequence.h similarity index 99% rename from sequence.h rename to pyc_sequence.h index 2145699..f6336cd 100644 --- a/sequence.h +++ b/pyc_sequence.h @@ -1,7 +1,7 @@ #ifndef _PYC_SEQUENCE_H #define _PYC_SEQUENCE_H -#include "object.h" +#include "pyc_object.h" #include #include #include diff --git a/string.cpp b/pyc_string.cpp similarity index 98% rename from string.cpp rename to pyc_string.cpp index 9df6307..c6b776c 100644 --- a/string.cpp +++ b/pyc_string.cpp @@ -1,6 +1,6 @@ -#include "string.h" +#include "pyc_string.h" +#include "pyc_module.h" #include "data.h" -#include "module.h" #include /* PycString */ diff --git a/string.h b/pyc_string.h similarity index 96% rename from string.h rename to pyc_string.h index 0daa4ec..84b587f 100644 --- a/string.h +++ b/pyc_string.h @@ -1,7 +1,7 @@ #ifndef _PYC_STRING_H #define _PYC_STRING_H -#include "object.h" +#include "pyc_object.h" #include class PycString : public PycObject { diff --git a/pycdas.cpp b/pycdas.cpp index c3c6fd5..9f40ff8 100644 --- a/pycdas.cpp +++ b/pycdas.cpp @@ -1,9 +1,9 @@ #include #include #include -#include "module.h" +#include "pyc_module.h" +#include "pyc_numeric.h" #include "bytecode.h" -#include "numeric.h" #ifdef WIN32 # define PATHSEP '\\' diff --git a/pycdas.vcproj b/pycdas.vcproj index 9112c9b..04c459c 100644 --- a/pycdas.vcproj +++ b/pycdas.vcproj @@ -261,14 +261,6 @@ RelativePath=".\bytecode.h" > - - - - @@ -282,49 +274,57 @@ > + + + + + + + + + + + + - - - - - - - - diff --git a/pycdc.vcproj b/pycdc.vcproj index 59b7735..651f935 100644 --- a/pycdc.vcproj +++ b/pycdc.vcproj @@ -261,14 +261,6 @@ RelativePath=".\bytecode.h" > - - - - @@ -282,49 +274,57 @@ > + + + + + + + + + + + + - - - - - - - -