浏览代码

Add, use tools/g.echo (g.dirseps is built too late)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@40207 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 15 年之前
父节点
当前提交
fe5bffe1b4
共有 3 个文件被更改,包括 15 次插入2 次删除
  1. 1 1
      include/Make/Rules.make
  2. 5 1
      tools/Makefile
  3. 9 0
      tools/g.echo.c

+ 1 - 1
include/Make/Rules.make

@@ -22,7 +22,7 @@ $(ARCH_INCDIR)/%.h: %.h
 	$(INSTALL_DATA) $< $@
 
 ifneq ($(MINGW),)
-mkpath = $(shell PATH="$(GISBASE)/bin:$(ARCH_LIBDIR):$$PATH" GISRC=$(RUN_GISRC) $(BIN)/g.dirseps$(EXE) -h $(1));$(2)
+mkpath = $(shell $(TOOLSDIR)/g.echo$(EXE) $(1));$(2)
 else
 mkpath = $(1):$(2)
 endif

+ 5 - 1
tools/Makefile

@@ -3,8 +3,12 @@ MODULE_TOPDIR = ..
 SUBDIRS = timer g.html2man
 
 include $(MODULE_TOPDIR)/include/Make/Dir.make
+include $(MODULE_TOPDIR)/include/Make/Compile.make
 
-default: parsubdirs $(TOOLSDIR)/mkhtml.py
+default: parsubdirs $(TOOLSDIR)/mkhtml.py $(TOOLSDIR)/g.echo$(EXE)
 
 $(TOOLSDIR)/mkhtml.py: mkhtml.py
 	$(INSTALL) $< $@
+
+$(TOOLSDIR)/g.echo$(EXE): $(OBJDIR)/g.echo.o
+	$(CC) $(LDFLAGS) $(EXTRA_LDFLAGS) -o $@ $^

+ 9 - 0
tools/g.echo.c

@@ -0,0 +1,9 @@
+#include <stdio.h>
+
+int main(int argc, char **argv)
+{
+    if (argc != 2)
+	return 1;
+    fputs(argv[1], stdout);
+    return 0;
+}