I typically want to leave my sources untouched, and build in a separate,
'opt' directory.  E.g.:

  $ cd src
  $ tar xzf /tmp/squidGuard-1.2.0.tar.gz
  $ cd ../opt
  $ mkdir squidGuard-1.2.0
  $ ../../src/squidGuard-1.2.0 configure
  $ make
  $ make install

The attached patch permits this, by injecting '$(srcdir)' before all
files which are pulled from the sources.

Tres.
-- 
===============================================================
Tres Seaver                                [EMAIL PROTECTED]
Zope Corporation      "Zope Dealers"       http://www.zope.com
diff -rc squidGuard-1.2.0/src/Makefile.in squidGuard-1.2.0-patched/src/Makefile.in
*** squidGuard-1.2.0/src/Makefile.in	Tue Mar  7 05:06:22 2000
--- squidGuard-1.2.0-patched/src/Makefile.in	Fri Mar  7 16:05:26 2003
***************
*** 52,68 ****
  conf: y.tab.o lex.yy.o
  	$(COMPILE) -o conf y.tab.o lex.yy.o
  
! main.o:	main.c sg.h
! 	$(COMPILE) -c main.c
  
! sgLog.o:	sgLog.c sg.h
! 	$(COMPILE) -c sgLog.c
  
! sgDiv.o: sgDiv.c sg.h
! 	$(COMPILE) -c sgDiv.c
  
! sgDb.o:	sgDb.c sg.h
! 	$(COMPILE) -c sgDb.c
  
  lex.yy.o: lex.yy.c y.tab.h sg.h
  	$(COMPILE) -c lex.yy.c
--- 52,68 ----
  conf: y.tab.o lex.yy.o
  	$(COMPILE) -o conf y.tab.o lex.yy.o
  
! main.o:	$(srcdir)/main.c sg.h
! 	$(COMPILE) -c $(srcdir)/main.c
  
! sgLog.o:	$(srcdir)/sgLog.c sg.h
! 	$(COMPILE) -c $(srcdir)/sgLog.c
  
! sgDiv.o: $(srcdir)/sgDiv.c sg.h
! 	$(COMPILE) -c $(srcdir)/sgDiv.c
  
! sgDb.o:	$(srcdir)/sgDb.c sg.h
! 	$(COMPILE) -c $(srcdir)/sgDb.c
  
  lex.yy.o: lex.yy.c y.tab.h sg.h
  	$(COMPILE) -c lex.yy.c
***************
*** 70,87 ****
  y.tab.o: y.tab.c y.tab.h sg.h
  	$(COMPILE) -c y.tab.c
  
! lex.yy.c: sg.l sg.h
! 	$(LEX) sg.l || cp lex.yy.c.flex lex.yy.c
  
! lex.yy.c.flex: sg.l sg.h
! 	$(LEX) sg.l
  	mv -f lex.yy.c lex.yy.c.flex
  
! y.tab.c y.tab.h: sg.y sg.h
! 	$(YACC) -d sg.y || (cp y.tab.c.bison y.tab.c && cp y.tab.h.bison y.tab.h)
  
! y.tab.c.bison y.tab.h.bison: sg.y sg.h
! 	$(YACC) -d sg.y
  	mv -f y.tab.c y.tab.c.bison
  	mv -f y.tab.h y.tab.h.bison
  
--- 70,87 ----
  y.tab.o: y.tab.c y.tab.h sg.h
  	$(COMPILE) -c y.tab.c
  
! lex.yy.c: $(srcdir)/sg.l sg.h
! 	$(LEX) $(srcdir)/sg.l || cp lex.yy.c.flex lex.yy.c
  
! lex.yy.c.flex: $(srcdir)/sg.l sg.h
! 	$(LEX) $(srcdir)/sg.l
  	mv -f lex.yy.c lex.yy.c.flex
  
! y.tab.c y.tab.h: $(srcdir)/sg.y sg.h
! 	$(YACC) -d $(srcdir)/sg.y || (cp y.tab.c.bison y.tab.c && cp y.tab.h.bison y.tab.h)
  
! y.tab.c.bison y.tab.h.bison: $(srcdir)/sg.y sg.h
! 	$(YACC) -d $(srcdir)/sg.y
  	mv -f y.tab.c y.tab.c.bison
  	mv -f y.tab.h y.tab.h.bison
  

Reply via email to