Re: squid store io modifications: a small fix

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sat, 22 Jan 2000 00:45:39 +0100

Yet more small fixes to the modular store I/O makefiles. This time for
building in an object directory separate from the sources.

Hint: To build a GNU program in a object directory outside it's sources,
change to the build directory and then invoke the configure program with
a full patch to the source directory. Requires GNU Make or another make
understanding the magic variable VPATH.

/Henrik

* squid-2.3.STABLE1-storeio-mod.1.obj_tree_build.patch *

Sat Jan 22 00:41:21 CET 2000
Modified Files in squid/src/fs/ufs
        Makefile.in
Modified Files in squid/src/fs/aufs
        Makefile.in
Modified Files in squid/src
        Makefile.in
Modified Files in squid/icons
        Makefile.in
Modified Files in squid/auth_modules/SMB
        Makefile.in

Added support to the modular store I/O source layout for building
Squid outside the source directory. I had not taken care of this
in my added constructs.

-----------------------------------------------------------------

Index: squid/auth_modules/SMB/Makefile.in
diff -u squid/auth_modules/SMB/Makefile.in:1.1.1.2 squid/auth_modules/SMB/Makefile.in:1.1.1.2.4.1
--- squid/auth_modules/SMB/Makefile.in:1.1.1.2 Sat Jan 15 00:39:51 2000
+++ squid/auth_modules/SMB/Makefile.in Sat Jan 22 00:41:10 2000
@@ -58,7 +58,8 @@
 CFLAGS = $(AC_CFLAGS) $(INCLUDE) $(DEFINES)
 AUTH_LIBS =
 
-LIBPROGS = $(SMB_AUTH_EXE) $(SMB_AUTH_HELPER)
+LIBPROGS = $(SMB_AUTH_EXE)
+LIBSCRIPTS = $(SMB_AUTH_HELPER)
 OBJS = smb_auth.o
 
 all: $(SMB_AUTH_EXE)
@@ -86,6 +87,18 @@
                 fi; \
                 echo $(INSTALL_BIN) $$f $(libexecdir); \
                 $(INSTALL_BIN) $$f $(libexecdir); \
+ if test -f $(libexecdir)/-$$f; then \
+ echo $(RM) -f $(libexecdir)/-$$f; \
+ $(RM) -f $(libexecdir)/-$$f; \
+ fi; \
+ done
+ @for f in $(LIBSCRIPTS); do \
+ if test -f $(libexecdir)/$$f; then \
+ echo $(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \
+ $(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \
+ fi; \
+ echo $(INSTALL_BIN) $$f $(libexecdir); \
+ $(INSTALL_BIN) $(srcdir)/$$f $(libexecdir); \
                 if test -f $(libexecdir)/-$$f; then \
                         echo $(RM) -f $(libexecdir)/-$$f; \
                         $(RM) -f $(libexecdir)/-$$f; \
Index: squid/icons/Makefile.in
diff -u squid/icons/Makefile.in:1.1.1.12 squid/icons/Makefile.in:1.1.1.12.10.1
--- squid/icons/Makefile.in:1.1.1.12 Sat Oct 30 13:24:36 1999
+++ squid/icons/Makefile.in Sat Jan 22 00:41:20 2000
@@ -56,7 +56,7 @@
                         :; \
                 else \
                         echo "$(INSTALL_FILE) $$f $(DEFAULT_ICON_DIR)"; \
- $(INSTALL_FILE) $$f $(DEFAULT_ICON_DIR); \
+ $(INSTALL_FILE) $(srcdir)/$$f $(DEFAULT_ICON_DIR); \
                 fi; \
         done
 
Index: squid/src/Makefile.in
diff -u squid/src/Makefile.in:1.1.1.35 squid/src/Makefile.in:1.1.1.35.4.1
--- squid/src/Makefile.in:1.1.1.35 Sat Jan 15 00:40:20 2000
+++ squid/src/Makefile.in Sat Jan 22 00:41:20 2000
@@ -202,10 +202,10 @@
         $(CC) -c $< $(CFLAGS) -I$(srcdir) $(DEFAULTS)
 
 globals.c: globals.h mk-globals-c.pl
- $(PERL) $(srcdir)/mk-globals-c.pl < $(srcdir)/globals.h > $@
+ $(PERL) $(srcdir)/mk-globals-c.pl < $< > $@
 
 string_arrays.c: enums.h mk-string-arrays.pl
- $(PERL) $(srcdir)/mk-string-arrays.pl < $(srcdir)/enums.h > $@
+ $(PERL) $(srcdir)/mk-string-arrays.pl < $< > $@
 
 $(CLIENT_EXE): client.o
         $(CC) -o $@ $(LDFLAGS) client.o $(CLIENT_LIBS)
@@ -223,7 +223,7 @@
         $(CC) $(LDFLAGS) unlinkd-daemon.o -o $@
 
 unlinkd-daemon.o: unlinkd.c
- $(CC) -c $(CFLAGS) -DUNLINK_DAEMON $(srcdir)/unlinkd.c -o $@
+ $(CC) -c $(CFLAGS) -DUNLINK_DAEMON $< -o $@
 
 cache_diff: cache_diff.o debug.o globals.o store_key_md5.o
         $(CC) -o $@ $(LDFLAGS) $@.o debug.o globals.o store_key_md5.o $(STD_APP_LIBS)
@@ -254,11 +254,14 @@
         s%@DEFAULT_MIB_PATH@%$(DEFAULT_MIB_PATH)%g;\
         s%@DEFAULT_ERROR_DIR@%$(DEFAULT_ERROR_DIR)%g;\
         s%@DEFAULT_PREFIX@%$(DEFAULT_PREFIX)%g;"\
- < $(srcdir)/cf.data.pre >$@
+ < $< >$@
 
-store_modules.c: $(srcdir)/store_modules.sh Makefile
- @sh $(srcdir)/store_modules.sh $(STORE_MODULES) >store_modules.c
+store_modules.c: store_modules.sh Makefile
+ @sh $< $(STORE_MODULES) >store_modules.c
 
+store_modules.o: store_modules.c
+ $(CC) -c $< $(CFLAGS) -I$(srcdir)
+
 $(STORE_OBJS): fs/stamp
 
 store_modules fs/stamp:
@@ -378,5 +381,5 @@
 tags:
         ctags *.[ch] ../include/*.h ../lib/*.[ch]
 
-depend:
- $(MAKEDEPEND) -I../include -I. -fMakefile *.c
+depend: cf_parser.c
+ $(MAKEDEPEND) $(INCLUDE) -fMakefile $(srcdir)/*.c
Index: squid/src/fs/aufs/Makefile.in
diff -u squid/src/fs/aufs/Makefile.in:1.1.1.1 squid/src/fs/aufs/Makefile.in:1.1.1.1.2.1
--- squid/src/fs/aufs/Makefile.in:1.1.1.1 Sat Jan 15 00:47:30 2000
+++ squid/src/fs/aufs/Makefile.in Sat Jan 22 00:41:21 2000
@@ -7,6 +7,7 @@
 FS = aufs
 
 top_srcdir = @top_srcdir@
+VPATH = @srcdir@
 
 CC = @CC@
 MAKEDEPEND = @MAKEDEPEND@
@@ -15,7 +16,7 @@
 AC_CFLAGS = @CFLAGS@
 SHELL = /bin/sh
 
-INCLUDE = -I. -I$(top_srcdir)/src -I$(top_srcdir)/include
+INCLUDE = -I../../../include -I$(top_srcdir)/include -I$(top_srcdir)/src/
 CFLAGS = $(AC_CFLAGS) $(INCLUDE) $(DEFINES)
 
 OUT = ../$(FS).a
Index: squid/src/fs/ufs/Makefile.in
diff -u squid/src/fs/ufs/Makefile.in:1.1.1.1 squid/src/fs/ufs/Makefile.in:1.1.1.1.2.1
--- squid/src/fs/ufs/Makefile.in:1.1.1.1 Sat Jan 15 00:47:30 2000
+++ squid/src/fs/ufs/Makefile.in Sat Jan 22 00:41:21 2000
@@ -7,6 +7,7 @@
 FS = ufs
 
 top_srcdir = @top_srcdir@
+VPATH = @srcdir@
 
 CC = @CC@
 MAKEDEPEND = @MAKEDEPEND@
@@ -15,7 +16,7 @@
 AC_CFLAGS = @CFLAGS@
 SHELL = /bin/sh
 
-INCLUDE = -I. -I$(top_srcdir)/src -I$(top_srcdir)/include
+INCLUDE = -I../../../include -I$(top_srcdir)/include -I$(top_srcdir)/src/
 CFLAGS = $(AC_CFLAGS) $(INCLUDE) $(DEFINES)
 
 OUT = ../$(FS).a
Received on Sat Jan 22 2000 - 06:26:01 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:20 MST