Subject: use patch about making static ls

From: "helios_bo" <[email-masked]>
Date: Wed, 16 Jun 1999 19:06:22 +0800

i will make static ls in solaris 2.5.1,but it is unsuccessed,
i do some step:
1. get fileutils-3.16 from your favourite GNU mirror site.
2. Unpack
3. patch < ls-static.patch
4. copy static-ls.c (see below) to the fileutils-3.16/src/ subdirectory.

5. cd into fileutils-3.16
6. run configure
7. make
8. cd into src
9. test with truss ./ls -la 2> err

but i make NO.3, it is unsuccessed,
it is available about this:
%patch < ls-static.patch
Looks like a new-style context diff.
File to patch:

but i don't know about reason,
this is ls-static.patch,i found at
http://www.landfield.com/wu-ftpd/support/static-ls.how-to:

*** fileutils-3.16/src/Makefile.in      Mon Jan 27 02:26:57 1997
--- fileutils-3.16-prep/src/Makefile.in Wed Mar 26 12:56:16 1997
***************
*** 74,79 ****
--- 74,80 ----
  cp_SOURCES = cp.c cp-aux.c cp-hash.c
  dir_SOURCES = ls.c ls-dir.c
  vdir_SOURCES = ls.c ls-vdir.c
+ static-ls_SOURCES = static-ls.c
  ls_SOURCES = ls.c ls-ls.c

  BUILT_SOURCES = dircolors.h
***************
*** 155,164 ****
  vdir_LDADD = $(LDADD)
  vdir_DEPENDENCIES =  ../lib/libfu.a
  vdir_LDFLAGS =
! ls_OBJECTS =  ls.$o ls-ls.$o
  ls_LDADD = $(LDADD)
  ls_DEPENDENCIES =  ../lib/libfu.a
! ls_LDFLAGS =
  mkdir_SOURCES = mkdir.c
  mkdir_OBJECTS =  mkdir.$o
  mkdir_LDADD = $(LDADD)
--- 156,166 ----
  vdir_LDADD = $(LDADD)
  vdir_DEPENDENCIES =  ../lib/libfu.a
  vdir_LDFLAGS =
! static-ls_OBJECTS =  static-ls.$o
! ls_OBJECTS =  ls.$o ls-ls.$o $(static-ls_OBJECTS)
  ls_LDADD = $(LDADD)
  ls_DEPENDENCIES =  ../lib/libfu.a
! ls_LDFLAGS = -static
  mkdir_SOURCES = mkdir.c
  mkdir_OBJECTS =  mkdir.$o
  mkdir_LDADD = $(LDADD)
***************
*** 199,205 ****
  touch_LDADD = $(LDADD)
  touch_DEPENDENCIES =  ../lib/libfu.a
  touch_LDFLAGS =
! CFLAGS = @CFLAGS@
  COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
  LINK = $(CC) $(LDFLAGS) -o $@
  HEADERS =  $(noinst_HEADERS)
--- 201,207 ----
  touch_LDADD = $(LDADD)
  touch_DEPENDENCIES =  ../lib/libfu.a
  touch_LDFLAGS =
! CFLAGS = -static @CFLAGS@
  COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
  LINK = $(CC) $(LDFLAGS) -o $@
  HEADERS =  $(noinst_HEADERS)

who can tell me reason,help me!!

---

From: Jim Davis <[email-masked]>
Date: Wed, 16 Jun 1999 10:34:01 -0700 (MST)

On Wed, 16 Jun 1999, helios_bo wrote:

> i will make static ls in solaris 2.5.1

Why?  I've yet to see a convincing argument that it was worth the bother.

> but i don't know about reason,

I seem to recall Sun's /usr/bin/patch needs more prompting than GNU patch
or Larry Wall's original patch program from way back when. Try telling it
'Makefile.in' or 'src/Makefile.in' or 'fileutils-3.16/src/Makefile.in' or
something like that.  Or try '-p 0' or '-p 1' flags.  Or just install GNU
patch!