[postgis-devel] [PostGIS] #1527: extensions/postgis/topology/Makefile.in uses non-POSIX [[ in makefile

PostGIS trac at osgeo.org
Wed Feb 1 16:23:58 PST 2012


#1527: extensions/postgis/topology/Makefile.in uses non-POSIX [[ in makefile
---------------------+------------------------------------------------------
 Reporter:  gdt      |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 2.0.0
Component:  postgis  |     Version:  trunk        
 Keywords:           |  
---------------------+------------------------------------------------------
 The [[ construct is beyond POSIX specifications, and not all shells
 implement it.  Even if so, there is no standard for the behavior.

 The following diff helps, but because there are underlying issues with
 revisions not being numeric, it doesn't work (but I think it fixes the [[
 issue).

 {{{
 Index: Makefile.in
 ===================================================================
 --- Makefile.in (revision 9010)
 +++ Makefile.in (working copy)
 @@ -72,14 +72,14 @@
  sql_minor_upgrade: ../postgis_extension_helper.sql
 sql_bits/remove_from_extension.sql.in sql/topology_upgrade_minor.sql
 sql_bits/topology_comments.sql ../postgis_extension_helper_uninstall.sql
         if test "$(PREREL_NUMBER)x" != "x"; then \
            v=$(PREREL_PREV); \
 -          while [[ $$v -ge 1 ]]; do \
 +          while [ "$$v" -ge 1 ]; do \
                cat $< >
 sql/$(EXTENSION)--$(MINORVERSION).$(PREREL_PREFIX)$$v--$(EXTVERSION).sql;
 \
                v=$$(($$v-1)); \
              done; \
         else \
           if test $(MICRO_NUMBER) -gt 0; then \
            v=0; \
 -          while [[ $$v -le $(MICRO_PREV) ]]; do \
 +          while [ "$$v" -le "$(MICRO_PREV)" ]; do \
             cat $< >
 sql/$(EXTENSION)--$(MINORVERSION).$(PREREL_PREFIX)$$v--$(EXTVERSION).sql;
 \
                v=$$(($$v+1)); \
             done; \
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1527>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list