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

changed Config.h behavior

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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)
Note: See TracChangeset for help on using the changeset viewer.