[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Portable makefiles - portable shell commands?
From: |
Eli Zaretskii |
Subject: |
Re: Portable makefiles - portable shell commands? |
Date: |
Sun, 03 Apr 2005 22:04:31 +0300 |
> Date: Sun, 3 Apr 2005 15:10:24 +0200
> From: "address@hidden" <address@hidden>
> Cc: address@hidden
>
> All that I'm still really concerned about is the portability of the
> shell commands that are used e.g. for the "clean" targets: I cannot
> simply get make from
> http://prdownloads.sf.net/mingw/mingw32-make-3.80.0-3.exe?download
> *and* write for example rm -f $(shell find . -name "*~") as a
> shell command for the clean target, can I?
>
> How can this problem best be addressed? sh.exe for Win32? Conditionals
> in the Makefile? ...?
The only truly portable way is to write a portable C program that
would perform operations like rm etc., and distribute it with your
package. Then arrange for the makefile to build that program first,
before you do anything else.
For example, suppose you write a simple program called 'port' that can
do these:
. "port rm files..." removes the named files
. "port cp files... dir" copies the named files into the named directory
. etc., you get what I mean