OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

> What Do You Do If There's No Destdir Option?
Capn_Fish
post May 5 2007, 07:04 PM
Post #1





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



How do you package an app up if "grep DESTDIR Makefile" returns nothing?
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
danr
post May 5 2007, 11:25 PM
Post #2





Group: Members
Posts: 138
Joined: 12-February 04
Member No.: 1,830



QUOTE(Capn_Fish @ May 6 2007, 03:04 AM)
How do you package an app up if "grep DESTDIR Makefile" returns nothing?
*

You could search the Makefile for 'prefix' or '/usr', and change to $PWD/ipkg/usr or something similar.
Go to the top of the page
 
+Quote Post
Capn_Fish
post May 6 2007, 06:50 AM
Post #3





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



QUOTE(danr @ May 6 2007, 02:25 AM)
QUOTE(Capn_Fish @ May 6 2007, 03:04 AM)
How do you package an app up if "grep DESTDIR Makefile" returns nothing?
*

You could search the Makefile for 'prefix' or '/usr', and change to $PWD/ipkg/usr or something similar.
*


Doesn't that lead to issues apon installation on the ipk?
Go to the top of the page
 
+Quote Post
desertrat
post May 6 2007, 03:08 PM
Post #4





Group: Members
Posts: 742
Joined: 15-October 05
From: Gulag, Siberia
Member No.: 8,322



QUOTE(Capn_Fish @ May 6 2007, 02:50 PM)
QUOTE(danr @ May 6 2007, 02:25 AM)

You could search the Makefile for 'prefix' or '/usr', and change to $PWD/ipkg/usr or something similar.
*

Doesn't that lead to issues apon installation on the ipk?

I think if you add the $PWD after have you done "make" and just before you do "make install" it should be OK? Otherwise find the "install" section of the Makefile and add DESTDIR manually. Eg here's one for zlib:

CODE
install: $(LIBS)
       -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
       -@if [ ! -d $(DESTDIR)$(includedir)  ]; then mkdir -p $(DESTDIR)$(includedir); fi
       -@if [ ! -d $(DESTDIR)$(libdir)      ]; then mkdir -p $(DESTDIR)$(libdir); fi
       -@if [ ! -d $(DESTDIR)$(man3dir)     ]; then mkdir -p $(DESTDIR)$(man3dir); fi
       cp zlib.h zconf.h $(DESTDIR)$(includedir)
       chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h
       cp $(LIBS) $(DESTDIR)$(libdir)
       cd $(DESTDIR)$(libdir); chmod 755 $(LIBS)
       -@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
       cd $(DESTDIR)$(libdir); if test -f $(SHAREDLIBV); then \
         rm -f $(SHAREDLIB) $(SHAREDLIBM); \
         ln -s $(SHAREDLIBV) $(SHAREDLIB); \
         ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
         (ldconfig || true)  >/dev/null 2>&1; \
       fi
       cp zlib.3 $(DESTDIR)$(man3dir)
       chmod 644 $(DESTDIR)$(man3dir)/zlib.3

QUOTE
Do I need to edit all of the makefiles
Normally you should only need to edit main Makefile, the ones in subdirectories usually defer "install" to that main Makefile. In fact I don't recall any application that required editing makefiles in the subdirectories.
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 25th October 2014 - 12:35 PM