浏览代码

- .d generation fix: sed with POSIX.1 re (e.g. Darwin, Solaris) does not
support '\?' (or '\+' or '\|')

Andrei Pelinescu-Onciul 17 年之前
父节点
当前提交
eac2c67764
共有 3 个文件被更改,包括 4 次插入3 次删除
  1. 1 1
      Makefile
  2. 2 1
      Makefile.defs
  3. 1 1
      Makefile.rules

+ 1 - 1
Makefile

@@ -438,7 +438,7 @@ $(man_prefix)/$(man_dir)/man8:
 $(man_prefix)/$(man_dir)/man5:
 $(man_prefix)/$(man_dir)/man5:
 		mkdir -p $(man_prefix)/$(man_dir)/man5
 		mkdir -p $(man_prefix)/$(man_dir)/man5
 		
 		
-# note: on solaris 8 sed: ? or \(...\)* (a.s.o) do not work
+# note: sed with POSIX.1 regex doesn't support |, + or ? (darwin, solaris ...) 
 install-cfg: $(cfg_prefix)/$(cfg_dir)
 install-cfg: $(cfg_prefix)/$(cfg_dir)
 		sed -e "s#/usr/.*lib/ser/modules/#$(modules_target)#g" \
 		sed -e "s#/usr/.*lib/ser/modules/#$(modules_target)#g" \
 			< etc/ser.cfg > $(cfg_prefix)/$(cfg_dir)ser.cfg.sample
 			< etc/ser.cfg > $(cfg_prefix)/$(cfg_dir)ser.cfg.sample

+ 2 - 1
Makefile.defs

@@ -251,7 +251,8 @@ ifneq (,$(findstring gcc, $(CC_LONGVER)))
 	CC_VER=$(word 1,$(CC)) $(shell $(CC) - --version|head -n 1|cut -d" " -f 3|\
 	CC_VER=$(word 1,$(CC)) $(shell $(CC) - --version|head -n 1|cut -d" " -f 3|\
 				 sed -e 's/^.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/'\
 				 sed -e 's/^.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/'\
 				 	 -e 's/^[^0-9].*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/')
 				 	 -e 's/^[^0-9].*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/')
-	# sun sed is a little brain damaged => this complicated expression
+	# sed with POSIX.1 regex doesn't support |, + or ? 
+        # (darwin, solaris ...) => this complicated expression
 	MKDEP=$(CC) -MM 
 	MKDEP=$(CC) -MM 
 	#transform gcc version into 2.9x or 3.0
 	#transform gcc version into 2.9x or 3.0
 	CC_SHORTVER=$(shell echo "$(CC_VER)" | cut -d" " -f 2| \
 	CC_SHORTVER=$(shell echo "$(CC_VER)" | cut -d" " -f 2| \

+ 1 - 1
Makefile.rules

@@ -28,7 +28,7 @@
 
 
 %.d: %.c $(ALLDEP)
 %.d: %.c $(ALLDEP)
 	@set -e; $(MKDEP) $(CFLAGS) $(INCLUDES) $(DEFS) $< \
 	@set -e; $(MKDEP) $(CFLAGS) $(INCLUDES) $(DEFS) $< \
-	|  sed 's#\(\($(*D)\)\?$(*F)\)\.o[ :]*#$*.o $@ : #g' > $@; \
+	|  sed 's#\(\($(*D)/\)\{0,1\}$(*F)\)\.o[ :]*#$*.o $@ : #g' > $@; \
 	[ -s $@ ] || rm -f $@
 	[ -s $@ ] || rm -f $@
 
 
 # use RPATH and SER_LIBS if needed (make install and the module depends
 # use RPATH and SER_LIBS if needed (make install and the module depends