Changeset 325


Ignore:
Timestamp:
May 18, 2006 4:06:33 PM (14 years ago)
Author:
andreasw
Message:

changed Config.h behavior

Location:
trunk/Cbc/src
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcHeuristic.cpp

    r311 r325  
    66#endif
    77
    8 #include "CbcConfig.hpp"
     8#include "CbcConfig.h"
    99
    1010#include <cassert>
  • trunk/Cbc/src/CbcMain.cpp

    r312 r325  
    22// Corporation and others.  All Rights Reserved.
    33
    4 #include "CbcConfig.hpp"
     4#include "CbcConfig.h"
    55
    66#if defined(_MSC_VER)
  • trunk/Cbc/src/CbcModel.cpp

    r311 r325  
    66#endif
    77
    8 #include "CbcConfig.hpp"
     8#include "CbcConfig.h"
    99
    1010#include <string>
  • trunk/Cbc/src/CbcNode.cpp

    r311 r325  
    66#endif
    77
    8 #include "CbcConfig.hpp"
     8#include "CbcConfig.h"
    99
    1010#include <string>
  • trunk/Cbc/src/CbcStrategy.cpp

    r311 r325  
    66#endif
    77
    8 #include "CbcConfig.hpp"
     8#include "CbcConfig.h"
    99
    1010#include <cassert>
  • trunk/Cbc/src/Makefile.am

    r324 r325  
    242242        CbcTreeLocal.hpp
    243243
    244 ########################################################################
    245 #     Generating the configure header that is to be distributed        #
    246 ########################################################################
    247 
    248 CONFIG_DIST = CbcConfig.hpp
    249 CONFIG_H = config_cbc.h
    250 $(libCbc_la_OBJECTS) $(cbc_OBJECTS) $(solve_OBJECTS): ../inc/$(CONFIG_DIST)
    251 
    252 nodist_include_HEADERS = ../inc/$(CONFIG_DIST)
    253 
    254 ../inc/$(CONFIG_DIST): ../inc/$(CONFIG_H)
    255         echo "/** Required defines from $(CONFIG_H) */" >bla.tmp
    256         echo "#ifndef __$(CONFIG_DIST)__" | sed -e 's/\./_/g' >>bla.tmp
    257         echo "#define __$(CONFIG_DIST)__" | sed -e 's/\./_/g' >>bla.tmp
    258         $(EGREP) 'COIN_|CBC_DEFAULT_SOLVER' $< >>bla.tmp
    259         echo "#endif" >>bla.tmp
    260         if test -r ../inc/$(CONFIG_DIST); then \
    261           if diff ../inc/$(CONFIG_DIST) bla.tmp >/dev/null 2>&1 ; then \
    262             rm -f bla.tmp; \
    263           else \
    264             rm -f ../inc/$(CONFIG_DIST); \
    265             mv bla.tmp ../inc/$(CONFIG_DIST); \
    266           fi; \
    267         else \
    268           mv bla.tmp ../inc/$(CONFIG_DIST); \
    269         fi
    270 
    271 CLEANFILES = bla.tmp
    272 
    273 DISTCLEANFILES = ../inc/$(CONFIG_DIST)
     244#############################################################################
     245# Create the Config.h file that always defines HAVE_CONFIG_H and install it #
     246#############################################################################
     247
     248# You only need to adapt the following line
     249ConfigHeader = CbcConfig.h
     250
     251install-exec-local:
     252        echo "#ifndef HAVE_CONFIG_H" >bla
     253        echo "#define HAVE_CONFIG_H" >>bla
     254        echo "#endif" >> bla
     255        cat $(srcdir)/$(ConfigHeader) >> bla
     256        $(install_sh_DATA) bla $(DESTDIR)$(includedir)/$(ConfigHeader)
     257        rm -f bla
     258
     259uninstall-local:
     260        rm -f $(DESTDIR)$(includedir)/$(ConfigHeader)
  • trunk/Cbc/src/Makefile.in

    r324 r325  
    121121am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
    122122am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
    123         "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"
     123        "$(DESTDIR)$(includedir)"
    124124libLTLIBRARIES_INSTALL = $(INSTALL)
    125125LTLIBRARIES = $(lib_LTLIBRARIES)
     
    204204DIST_SOURCES = $(libCbc_la_SOURCES) $(cbc_SOURCES) $(solve_SOURCES)
    205205includeHEADERS_INSTALL = $(INSTALL_HEADER)
    206 nodist_includeHEADERS_INSTALL = $(INSTALL_HEADER)
    207 HEADERS = $(include_HEADERS) $(nodist_include_HEADERS)
     206HEADERS = $(include_HEADERS)
    208207ETAGS = etags
    209208CTAGS = ctags
     
    533532
    534533
    535 ########################################################################
    536 #     Generating the configure header that is to be distributed        #
    537 ########################################################################
    538 CONFIG_DIST = CbcConfig.hpp
    539 CONFIG_H = config_cbc.h
    540 nodist_include_HEADERS = ../inc/$(CONFIG_DIST)
    541 CLEANFILES = bla.tmp
    542 DISTCLEANFILES = ../inc/$(CONFIG_DIST)
     534#############################################################################
     535# Create the Config.h file that always defines HAVE_CONFIG_H and install it #
     536#############################################################################
     537
     538# You only need to adapt the following line
     539ConfigHeader = CbcConfig.h
    543540all: all-am
    544541
     
    717714        @$(NORMAL_UNINSTALL)
    718715        @list='$(include_HEADERS)'; for p in $$list; do \
    719           f=$(am__strip_dir) \
    720           echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
    721           rm -f "$(DESTDIR)$(includedir)/$$f"; \
    722         done
    723 install-nodist_includeHEADERS: $(nodist_include_HEADERS)
    724         @$(NORMAL_INSTALL)
    725         test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
    726         @list='$(nodist_include_HEADERS)'; for p in $$list; do \
    727           if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
    728           f=$(am__strip_dir) \
    729           echo " $(nodist_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
    730           $(nodist_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
    731         done
    732 
    733 uninstall-nodist_includeHEADERS:
    734         @$(NORMAL_UNINSTALL)
    735         @list='$(nodist_include_HEADERS)'; for p in $$list; do \
    736716          f=$(am__strip_dir) \
    737717          echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
     
    820800
    821801installdirs:
    822         for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \
     802        for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"; do \
    823803          test -z "$$dir" || $(mkdir_p) "$$dir"; \
    824804        done
     
    840820
    841821clean-generic:
    842         -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
    843822
    844823distclean-generic:
    845824        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
    846         -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
    847825
    848826maintainer-clean-generic:
     
    870848info-am:
    871849
    872 install-data-am: install-includeHEADERS install-nodist_includeHEADERS
    873 
    874 install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
     850install-data-am: install-includeHEADERS
     851
     852install-exec-am: install-binPROGRAMS install-exec-local \
     853        install-libLTLIBRARIES
    875854
    876855install-info: install-info-am
     
    899878
    900879uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \
    901         uninstall-info-am uninstall-libLTLIBRARIES \
    902         uninstall-nodist_includeHEADERS
     880        uninstall-info-am uninstall-libLTLIBRARIES uninstall-local
    903881
    904882.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
     
    908886        html-am info info-am install install-am install-binPROGRAMS \
    909887        install-data install-data-am install-exec install-exec-am \
    910         install-includeHEADERS install-info install-info-am \
    911         install-libLTLIBRARIES install-man \
    912         install-nodist_includeHEADERS install-strip installcheck \
    913         installcheck-am installdirs maintainer-clean \
    914         maintainer-clean-generic mostlyclean mostlyclean-compile \
    915         mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
    916         tags uninstall uninstall-am uninstall-binPROGRAMS \
    917         uninstall-includeHEADERS uninstall-info-am \
    918         uninstall-libLTLIBRARIES uninstall-nodist_includeHEADERS
    919 
    920 $(libCbc_la_OBJECTS) $(cbc_OBJECTS) $(solve_OBJECTS): ../inc/$(CONFIG_DIST)
    921 
    922 ../inc/$(CONFIG_DIST): ../inc/$(CONFIG_H)
    923         echo "/** Required defines from $(CONFIG_H) */" >bla.tmp
    924         echo "#ifndef __$(CONFIG_DIST)__" | sed -e 's/\./_/g' >>bla.tmp
    925         echo "#define __$(CONFIG_DIST)__" | sed -e 's/\./_/g' >>bla.tmp
    926         $(EGREP) 'COIN_|CBC_DEFAULT_SOLVER' $< >>bla.tmp
    927         echo "#endif" >>bla.tmp
    928         if test -r ../inc/$(CONFIG_DIST); then \
    929           if diff ../inc/$(CONFIG_DIST) bla.tmp >/dev/null 2>&1 ; then \
    930             rm -f bla.tmp; \
    931           else \
    932             rm -f ../inc/$(CONFIG_DIST); \
    933             mv bla.tmp ../inc/$(CONFIG_DIST); \
    934           fi; \
    935         else \
    936           mv bla.tmp ../inc/$(CONFIG_DIST); \
    937         fi
     888        install-exec-local install-includeHEADERS install-info \
     889        install-info-am install-libLTLIBRARIES install-man \
     890        install-strip installcheck installcheck-am installdirs \
     891        maintainer-clean maintainer-clean-generic mostlyclean \
     892        mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
     893        pdf pdf-am ps ps-am tags uninstall uninstall-am \
     894        uninstall-binPROGRAMS uninstall-includeHEADERS \
     895        uninstall-info-am uninstall-libLTLIBRARIES uninstall-local
     896
     897
     898install-exec-local:
     899        echo "#ifndef HAVE_CONFIG_H" >bla
     900        echo "#define HAVE_CONFIG_H" >>bla
     901        echo "#endif" >> bla
     902        cat $(srcdir)/$(ConfigHeader) >> bla
     903        $(install_sh_DATA) bla $(DESTDIR)$(includedir)/$(ConfigHeader)
     904        rm -f bla
     905
     906uninstall-local:
     907        rm -f $(DESTDIR)$(includedir)/$(ConfigHeader)
    938908# Tell versions [3.59,3.63) of GNU make to not export all variables.
    939909# Otherwise a system limit (for SysV at least) may be exceeded.
  • trunk/Cbc/src/unitTest.cpp

    r312 r325  
    33// Test individual classes or groups of classes
    44
    5 #include "CbcConfig.hpp"
     5#include "CbcConfig.h"
    66
    77#if defined(_MSC_VER)
Note: See TracChangeset for help on using the changeset viewer.