Changeset 772


Ignore:
Timestamp:
May 18, 2006 3:41:13 PM (14 years ago)
Author:
andreasw
Message:

changed Config.h behavior

Location:
trunk/Clp/src
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/CbcOrClpParam.hpp

    r760 r772  
    33
    44#ifdef USE_CBCCONFIG
    5 # include "CbcConfig.hpp"
     5# include "CbcConfig.h"
    66#else
    7 # include "ClpConfig.hpp"
     7# include "ClpConfig.h"
    88#endif
    99
  • trunk/Clp/src/ClpModel.hpp

    r760 r772  
    44#define ClpModel_H
    55
    6 #include "ClpConfig.hpp"
     6#include "ClpConfig.h"
    77
    88#include <iostream>
  • trunk/Clp/src/ClpSimplex.cpp

    r760 r772  
    55//#undef NDEBUG
    66
    7 #include "ClpConfig.hpp"
     7#include "ClpConfig.h"
    88
    99#include "CoinPragma.hpp"
  • trunk/Clp/src/ClpSolve.cpp

    r760 r772  
    44// This file has higher level solve functions
    55
    6 #include "ClpConfig.hpp"
     6#include "ClpConfig.h"
    77#include "CoinPragma.hpp"
    88
  • trunk/Clp/src/Makefile.am

    r771 r772  
    114114# and that therefore should be installed in 'install'
    115115include_HEADERS = \
     116        ../inc/config_clp.h \
    116117        ClpDualRowDantzig.hpp \
    117118        ClpDualRowPivot.hpp \
     
    141142        Idiot.hpp
    142143
    143 ########################################################################
    144 #     Generating the configure header that is to be distributed        #
    145 ########################################################################
     144#############################################################################
     145# Create the Config.h file that always defines HAVE_CONFIG_H and install it #
     146#############################################################################
    146147
    147 # You should only need to adapt the following three lines
    148 CONFIG_DIST = ClpConfig.hpp
    149 CONFIG_H = config_clp.h
    150 $(libClp_la_OBJECTS) $(clp_OBJECTS): ../inc/$(CONFIG_DIST)
     148# You only need to adapt the following line
     149ConfigHeader = ClpConfig.h
    151150
    152 nodist_include_HEADERS = ../inc/$(CONFIG_DIST)
     151install-exec-local:
     152        echo "#ifndef HAVE_CONFIG_H" >bla
     153        echo "#define HAVE_CONFIG_H" >>bla
     154        echo "#endif" >> bla
     155        cat $(srcdir)/$(ConfigHeader) >> bla
     156        $(install_sh_DATA) bla $(DESTDIR)$(includedir)/$(ConfigHeader)
    153157
    154 ../inc/$(CONFIG_DIST): ../inc/$(CONFIG_H)
    155         echo "/** Required defines from $(CONFIG_H) */" >bla.tmp
    156         echo "#ifndef __$(CONFIG_DIST)__" | sed -e 's/\./_/g' >>bla.tmp
    157         echo "#define __$(CONFIG_DIST)__" | sed -e 's/\./_/g' >>bla.tmp
    158         $(EGREP) 'COIN_' $< >>bla.tmp
    159         echo "#endif" >>bla.tmp
    160         if test -r ../inc/$(CONFIG_DIST); then \
    161           if diff ../inc/$(CONFIG_DIST) bla.tmp >/dev/null 2>&1 ; then \
    162             rm -f bla.tmp; \
    163           else \
    164             rm -f ../inc/$(CONFIG_DIST); \
    165             mv bla.tmp ../inc/$(CONFIG_DIST); \
    166           fi; \
    167         else \
    168           mv bla.tmp ../inc/$(CONFIG_DIST); \
    169         fi
    170 
    171 CLEANFILES = bla.tmp
    172 
    173 DISTCLEANFILES = ../inc/$(CONFIG_DIST)
     158uninstall-local:
     159        rm -f $(DESTDIR)$(includedir)/$(ConfigHeader)
  • trunk/Clp/src/Makefile.in

    r771 r772  
    6464am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
    6565am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
    66         "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"
     66        "$(DESTDIR)$(includedir)"
    6767libLTLIBRARIES_INSTALL = $(INSTALL)
    6868LTLIBRARIES = $(lib_LTLIBRARIES)
     
    112112DIST_SOURCES = $(libClp_la_SOURCES) $(clp_SOURCES)
    113113includeHEADERS_INSTALL = $(INSTALL_HEADER)
    114 nodist_includeHEADERS_INSTALL = $(INSTALL_HEADER)
    115 HEADERS = $(include_HEADERS) $(nodist_include_HEADERS)
     114HEADERS = $(include_HEADERS)
    116115ETAGS = etags
    117116CTAGS = ctags
     
    342341# and that therefore should be installed in 'install'
    343342include_HEADERS = \
     343        ../inc/config_clp.h \
    344344        ClpDualRowDantzig.hpp \
    345345        ClpDualRowPivot.hpp \
     
    370370
    371371
    372 ########################################################################
    373 #     Generating the configure header that is to be distributed        #
    374 ########################################################################
    375 
    376 # You should only need to adapt the following three lines
    377 CONFIG_DIST = ClpConfig.hpp
    378 CONFIG_H = config_clp.h
    379 nodist_include_HEADERS = ../inc/$(CONFIG_DIST)
    380 CLEANFILES = bla.tmp
    381 DISTCLEANFILES = ../inc/$(CONFIG_DIST)
     372#############################################################################
     373# Create the Config.h file that always defines HAVE_CONFIG_H and install it #
     374#############################################################################
     375
     376# You only need to adapt the following line
     377ConfigHeader = ClpConfig.h
    382378all: all-am
    383379
     
    573569          rm -f "$(DESTDIR)$(includedir)/$$f"; \
    574570        done
    575 install-nodist_includeHEADERS: $(nodist_include_HEADERS)
    576         @$(NORMAL_INSTALL)
    577         test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
    578         @list='$(nodist_include_HEADERS)'; for p in $$list; do \
    579           if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
    580           f=$(am__strip_dir) \
    581           echo " $(nodist_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
    582           $(nodist_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
    583         done
    584 
    585 uninstall-nodist_includeHEADERS:
    586         @$(NORMAL_UNINSTALL)
    587         @list='$(nodist_include_HEADERS)'; for p in $$list; do \
    588           f=$(am__strip_dir) \
    589           echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
    590           rm -f "$(DESTDIR)$(includedir)/$$f"; \
    591         done
    592571
    593572ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
     
    640619
    641620distdir: $(DISTFILES)
     621        $(mkdir_p) $(distdir)/../inc
    642622        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
    643623        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
     
    672652
    673653installdirs:
    674         for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \
     654        for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"; do \
    675655          test -z "$$dir" || $(mkdir_p) "$$dir"; \
    676656        done
     
    692672
    693673clean-generic:
    694         -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
    695674
    696675distclean-generic:
    697676        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
    698         -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
    699677
    700678maintainer-clean-generic:
     
    722700info-am:
    723701
    724 install-data-am: install-includeHEADERS install-nodist_includeHEADERS
    725 
    726 install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
     702install-data-am: install-includeHEADERS
     703
     704install-exec-am: install-binPROGRAMS install-exec-local \
     705        install-libLTLIBRARIES
    727706
    728707install-info: install-info-am
     
    751730
    752731uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \
    753         uninstall-info-am uninstall-libLTLIBRARIES \
    754         uninstall-nodist_includeHEADERS
     732        uninstall-info-am uninstall-libLTLIBRARIES uninstall-local
    755733
    756734.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
     
    760738        html-am info info-am install install-am install-binPROGRAMS \
    761739        install-data install-data-am install-exec install-exec-am \
    762         install-includeHEADERS install-info install-info-am \
    763         install-libLTLIBRARIES install-man \
    764         install-nodist_includeHEADERS install-strip installcheck \
    765         installcheck-am installdirs maintainer-clean \
    766         maintainer-clean-generic mostlyclean mostlyclean-compile \
    767         mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
    768         tags uninstall uninstall-am uninstall-binPROGRAMS \
    769         uninstall-includeHEADERS uninstall-info-am \
    770         uninstall-libLTLIBRARIES uninstall-nodist_includeHEADERS
    771 
    772 $(libClp_la_OBJECTS) $(clp_OBJECTS): ../inc/$(CONFIG_DIST)
    773 
    774 ../inc/$(CONFIG_DIST): ../inc/$(CONFIG_H)
    775         echo "/** Required defines from $(CONFIG_H) */" >bla.tmp
    776         echo "#ifndef __$(CONFIG_DIST)__" | sed -e 's/\./_/g' >>bla.tmp
    777         echo "#define __$(CONFIG_DIST)__" | sed -e 's/\./_/g' >>bla.tmp
    778         $(EGREP) 'COIN_' $< >>bla.tmp
    779         echo "#endif" >>bla.tmp
    780         if test -r ../inc/$(CONFIG_DIST); then \
    781           if diff ../inc/$(CONFIG_DIST) bla.tmp >/dev/null 2>&1 ; then \
    782             rm -f bla.tmp; \
    783           else \
    784             rm -f ../inc/$(CONFIG_DIST); \
    785             mv bla.tmp ../inc/$(CONFIG_DIST); \
    786           fi; \
    787         else \
    788           mv bla.tmp ../inc/$(CONFIG_DIST); \
    789         fi
     740        install-exec-local install-includeHEADERS install-info \
     741        install-info-am install-libLTLIBRARIES install-man \
     742        install-strip installcheck installcheck-am installdirs \
     743        maintainer-clean maintainer-clean-generic mostlyclean \
     744        mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
     745        pdf pdf-am ps ps-am tags uninstall uninstall-am \
     746        uninstall-binPROGRAMS uninstall-includeHEADERS \
     747        uninstall-info-am uninstall-libLTLIBRARIES uninstall-local
     748
     749
     750install-exec-local:
     751        echo "#ifndef HAVE_CONFIG_H" >bla
     752        echo "#define HAVE_CONFIG_H" >>bla
     753        echo "#endif" >> bla
     754        cat $(srcdir)/$(ConfigHeader) >> bla
     755        $(install_sh_DATA) bla $(DESTDIR)$(includedir)/$(ConfigHeader)
     756
     757uninstall-local:
     758        rm -f $(DESTDIR)$(includedir)/$(ConfigHeader)
    790759# Tell versions [3.59,3.63) of GNU make to not export all variables.
    791760# Otherwise a system limit (for SysV at least) may be exceeded.
  • trunk/Clp/src/unitTest.cpp

    r770 r772  
    22// Corporation and others.  All Rights Reserved.
    33
    4 #include "ClpConfig.hpp"
     4#include "ClpConfig.h"
    55#include "CoinPragma.hpp"
    66#include <cassert>
Note: See TracChangeset for help on using the changeset viewer.