Re: [PATCHES] src/include/Makefile: remove-old-headers

2004-11-08 Thread Neil Conway
On Sun, 2004-11-07 at 11:33, Alvaro Herrera wrote:
 Since the behavior previously known as install-all-headers is now the
 default, there's no point in keeping that target.  This patch removes it.

Looks good -- applied.

Note that I believe pre-7.1 would put these extra headers in a different
place than 8.0 will put them (pre-7.1 uses $DESTDIR$includedir/foo.h,
8.0 will use $DESTDIR$includedir/server/.../foo.h, where ... may be
vary between headers). Still, worrying about nuking those old headers
seems pointless.

-Neil



---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


[PATCHES] src/include/Makefile: remove-old-headers

2004-11-06 Thread Alvaro Herrera
Hackers,

There is a remove-old-headers target in src/include/Makefile that is
supposed to clean old headers unless the user did a install-all-headers.
Moreover, that target is invoked by the install target.

Since the behavior previously known as install-all-headers is now the
default, there's no point in keeping that target.  This patch removes it.

-- 
Alvaro Herrera (alvherre[a]dcc.uchile.cl)
Los dioses no protegen a los insensatos.  Éstos reciben protección de
otros insensatos mejor dotados (Luis Wu, Mundo Anillo)
Index: src/include/Makefile
===
RCS file: /home/alvherre/cvs/pgsql/src/include/Makefile,v
retrieving revision 1.16
diff -c -r1.16 Makefile
*** src/include/Makefile3 Nov 2004 07:38:08 -   1.16
--- src/include/Makefile7 Nov 2004 00:29:54 -
***
*** 21,27 
nodes optimizer parser port regex rewrite storage tcop utils
  
  # Install all headers
! install: all installdirs remove-old-headers
  # These headers are needed by the public headers of the interfaces.
$(INSTALL_DATA) $(srcdir)/postgres_ext.h   $(DESTDIR)$(includedir)
$(INSTALL_DATA) $(srcdir)/libpq/libpq-fs.h $(DESTDIR)$(includedir)/libpq
--- 21,27 
nodes optimizer parser port regex rewrite storage tcop utils
  
  # Install all headers
! install: all installdirs
  # These headers are needed by the public headers of the interfaces.
$(INSTALL_DATA) $(srcdir)/postgres_ext.h   $(DESTDIR)$(includedir)
$(INSTALL_DATA) $(srcdir)/libpq/libpq-fs.h $(DESTDIR)$(includedir)/libpq
***
*** 50,73 
$(mkinstalldirs) $(addprefix $(DESTDIR)$(includedir_server)/, 
$(SUBDIRS))
  
  
- # Pre-7.1 Postgres installed some headers that are no longer installed by
- # default.  If we see these headers in the target directory, zap them to
- # avoid cross-version compile problems.  However, don't zap them if they
- # match current sources (that means the user did install-all-headers).
- 
- remove-old-headers:
-   for file in fmgr.h postgres.h access/attnum.h commands/trigger.h \
-   executor/spi.h utils/elog.h utils/geo_decls.h utils/mcxt.h \
-   utils/palloc.h; do \
-   if cmp -s $(srcdir)/$$file $(DESTDIR)$(includedir)/$$file 
2/dev/null; \
-   then \
-   : ; \
-   else \
-   rm -f $(DESTDIR)$(includedir)/$$file; \
-   fi ; \
-   done
- 
- 
  uninstall:
rm -f $(addprefix $(DESTDIR)$(includedir)/, pg_config.h pg_config_os.h 
postgres_ext.h libpq/libpq-fs.h)
rm -f $(addprefix $(DESTDIR)$(includedir_internal)/, c.h postgres_fe.h 
libpq/pqcomm.h)
--- 50,55 

---(end of broadcast)---
TIP 8: explain analyze is your friend