bug-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-glpk] Makefile suggestions


From: Falk Hueffner
Subject: [Bug-glpk] Makefile suggestions
Date: 20 Oct 2001 22:19:18 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.5 (anise)

Hi,

I'd like to make a Debian package of glpk, and for that two things
need to be changed: make install prefix=/some/where must work, and
make clean must delete all generated files. The former doesn't work
because headers get installed hardwired to /usr/include, and also
glpsol and lpbglpk.a don't get cleaned. I don't quite understand what
the intention of "oldincludedir" is; I just removed it.

Generally, I wonder whether it wouldn't be easier to use automake,
which has dependency tracking as an additional bonus. I have some
experience with automake, so I could help with that.

Also, I think it would be much nicer if the glpk headers were
installed into a subdirectory "glpk" or similar, and to let people
include <glpk/xxxx.h>. That would help keeping the include dir small.

In any case, here's my patch against glpk-3.0.3.

        Falk

--- glpk-3.0.3.orig/Makefile.in                                                 
+++ glpk-3.0.3/Makefile.in                                                      
@@ -36,7 +36,6 @@                                                               
 bindir = @bindir@                                                              
 libdir = @libdir@                                                              
 includedir = @includedir@                                                      
-oldincludedir = @oldincludedir@                                                
 mandir = @mandir@                                                              
 infodir = @prefix@/info                                                        
                                                                                
@@ -418,9 +417,7 @@                                                             
 install: all installdirs                                                       
        for i in $(HDRS); do \                                                  
                $(INSTALL_DATA) $(srcdir)/include/$$i \                         
-                       $(DESTDIR)$(includedir)/$$i; \                          
-               $(INSTALL_DATA) $(srcdir)/include/$$i \                         
-                       $(DESTDIR)$(oldincludedir)/$$i || : ; \                 
+                       $(DESTDIR)$(includedir)/$$i || : ; \                    
        done                                                                    
        $(INSTALL_DATA) libglpk.a $(DESTDIR)$(libdir)/libglpk.a                 
        $(INSTALL_PROGRAM) glpsol $(DESTDIR)$(bindir)/glpsol                    
@@ -439,7 +436,7 @@                                                             
        $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install                 
                                                                                
 clean:                                                                         
-       rm -f $(OBJS)                                                           
+       rm -f $(OBJS) glpsol libglpk.a                                          
                                                                                
 distclean: clean                                                               
        rm -f Makefile config.log config.cache config.status                    
@@ -492,5 +489,6 @@                                                             
 installdirs:                                                                   
        $(SHELL) $(srcdir)/mkinstalldirs $(includedir)                          
        $(SHELL) $(srcdir)/mkinstalldirs $(libdir)                              
+       $(SHELL) $(srcdir)/mkinstalldirs $(bindir)                              
                                                                                
 ## /* eof */                                                                   



reply via email to

[Prev in Thread] Current Thread [Next in Thread]