Re: [PATCH] extract gifs from icons.shar at make time

From: Robert Collins <robert.collins@dont-contact.us>
Date: Wed, 3 Jan 2001 10:12:41 +1100

Question:

I had the patch set to extract into the build directory. The source tarballs could be distributed with the shar archive doing that.
Alternatively the patch can extract the icons into the source directory as is currently manually done.

What is the consensus? My preference is to extract into the build dir, and for the source tarballs to use shar to extract the icons,
rather than coming pre extracted. I'll happily bend to feedback though :-]

The attached patch is based on sourceforce squid-head,
* tunnels the build through a intermediary for make -j
* extracts into the build directory.
* installs from the build directory.
* uses a timestamp file so the shar archive doesn't run every time
* has been tested with builddir=srcdir and with separate src * build dirs
distribution source tarballs should ship the shar archive.

To flip it to extract into the source, change the extract command and the install commands.

===start here===
Index: Makefile.in
===================================================================
RCS file: /cvsroot/squid/squid/icons/Makefile.in,v
retrieving revision 1.4
diff -u -r1.4 Makefile.in
--- Makefile.in 2000/12/12 23:21:16 1.4
+++ Makefile.in 2001/01/02 22:58:41
@@ -47,19 +47,22 @@

 all: $(ICONS)

-$(ICONS):
+$(ICONS): extract_icons
+
+extract_icons:
        @$(SHELL) -c "$(SHELL) $(srcdir)/icons.shar"
+ touch extract_icons

 icons.shar:
        shar --no-timestamp $(ICONS) > $@

-install: install-mkdirs anthony-xpm.gif
+install: install-mkdirs $(ICONS)
        @for f in $(ICONS); do \
                if test -f $(DEFAULT_ICON_DIR)/$$f ; then \
                        :; \
                else \
                        echo "$(INSTALL_FILE) $$f $(DEFAULT_ICON_DIR)"; \
- $(INSTALL_FILE) $(srcdir)/$$f $(DEFAULT_ICON_DIR); \
+ $(INSTALL_FILE) $$f $(DEFAULT_ICON_DIR); \
                fi; \
        done

@@ -78,7 +81,8 @@
        fi

 clean:
-
+ -rm -f $(ICONS)
+ -rm extract_icons

 distclean: clean
        -rm -f Makefile
===eof===

----- Original Message -----
From: "Duane Wessels" <wessels@squid-cache.org>
To: "Robert Collins" <robert.collins@itdomain.com.au>
Cc: <squid-dev@squid-cache.org>
Sent: Wednesday, January 03, 2001 8:10 AM
Subject: Re: [PATCH] extract gifs from icons.shar at make time

>
>
> On Thu, 14 Dec 2000, Robert Collins wrote:
>
> > Ahh. I didn't delete my installed icons when testing it. Doh. (I always build outside the source dir though)
> >
> > Duane - do you want another patch sent in, or are Henrik's comments enough?
> >
> > Rob
> >
> > ----- Original Message -----
> > From: "Henrik Nordstrom" <hno@hem.passagen.se>
> > To: "Robert Collins" <robert.collins@itdomain.com.au>
> > Cc: <squid-dev@squid-cache.org>
> > Sent: Thursday, December 14, 2000 3:56 AM
> > Subject: Re: [PATCH] extract gifs from icons.shar at make time
> >
> >
> > > You better tunnel it via a phony target to avoid multiple invocations on
> > > parallell builds, and then you also need to care for builds outside of
> > > the source directory. install expects the icons to be in the source
> > > directory...
> > >
> > >
> > > .PHONY: extract_icons
> > > $(ICONS): extract_icons
> > > extract_icons:
> > > @$(SHELL) -c "cd $(srcdir); $(SHELL) $(srcdir)/icons.shar"
>
>
>
> Hi Rob,
>
> I'll take you up on your offer to make a patch for me :-)
>
> thanks...
>
>
Received on Tue Jan 02 2001 - 16:02:33 MST

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