Somebody didn't take into account the possibility that $(shlib)
is the same name as lib$(NAME)$(DLSUFFIX).
install-shlib: $(shlib)
$(INSTALL) $(INSTL_SHLIB_OPTS) $(shlib) $(LIBDIR)/$(shlib)
rm -f $(LIBDIR)/lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
rm -f $(LIBDIR)/lib$(NAME)$(DLSUFFIX)
cd $(LIBDIR) && $(LN_S) -f $(shlib) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
cd $(LIBDIR) && $(LN_S) -f $(shlib) lib$(NAME)$(DLSUFFIX)
This deletes the actual shared lib and replaces it with a symlink
pointing to itself. Grumble. The debris:
$ ls -lF /usr/local/pgsql/lib
total 2296
-r--r--r-- 1 postgres users 624 Oct 17 21:56 global1.bki.source
-r--r--r-- 1 postgres users 0 Oct 17 21:56 global1.description
-r--r--r-- 1 postgres users 34882 Oct 17 21:56 libecpg.a
-rw-r--r-- 1 postgres users 90220 Oct 17 21:56 libpgtcl.a
lrwxr-xr-x 1 postgres users 11 Oct 17 21:56 libpgtcl.sl@ -> libpgtcl.sl
lrwxr-xr-x 1 postgres users 11 Oct 17 21:56 libpgtcl.sl.2@ -> libpgtcl.sl
-rw-r--r-- 1 postgres users 158224 Oct 17 21:56 libpq++.a
-rw-r--r-- 1 postgres users 196120 Oct 17 21:56 libpq.a
lrwxr-xr-x 1 postgres users 8 Oct 17 21:56 libpq.sl@ -> libpq.sl
lrwxr-xr-x 1 postgres users 8 Oct 17 21:56 libpq.sl.2@ -> libpq.sl
-r--r--r-- 1 postgres users 160633 Oct 17 21:56 local1_template1.bki.source
-r--r--r-- 1 postgres users 17622 Oct 17 21:56 local1_template1.description
-r--r--r-- 1 postgres users 2838 Oct 17 21:56 pg_geqo.sample
-r--r--r-- 1 postgres users 5192 Oct 17 21:56 pg_hba.conf.sample
-rw-r--r-- 1 postgres users 452568 Oct 17 21:57 plpgsql.sl
BTW, the install for plpgsql.sl is not right either --- it doesn't have
this symlink problem, but the permissions on the file are wrong. HPUX
wants shlibs to be executable.
regards, tom lane