GNU & BSD Makefile Directives & Conditions Compatibility
Firstly, I would like to apologize if this is not the appropriate sub-forum to post about GNU/BSD makefile scripting. Though my code is in C++, because I am focusing on the makefile I thought it would go better in shell scripting. Please correct me if I am wrong.
Secondly, I am not interested in dealing with autotools/autogen yet. I want to focus on learning about make/gmake.
I have seen this subject posted on the web, but have not found a solution for myself yet.
I want users to be able to compile from my Makefile on Linux, BSD, & Windows systems. The makefile tests if the target platform is Win32 using conditional directives. I much prefer BSD as the GNU syntax is confusing to me:
However this is not compatible with GNU make:
Quote:
$ gmake
Makefile:20: *** missing separator. Stop.
For GNU make it needs to be something like this:
or I think I can use something like this (though this example doesn't work as intented):
Neither of which are compatible with BSD make
My base question is how to make my Makefile both GNU & BSD compatible. Is it possible to do within a single file or do I need to separate them? Can I have a base makefile that imports another of either GNU or BSD standards? Or, do I just need to make 2 completely separate files?
Hello,
Below I try to control that the input is good an IP :
#!/bin/bash
cp /home/scripts/choice_interfaces.txt /home/scripts/interfaces.txt
chmod 644 /home/scripts/interfaces.txt
echo -e "Please enter the network informations into the /etc/network/interfaces file, complete them below... (9 Replies)
Hi All,
Do you have any sample script,
- auto get file from SFTP remote server and delete file in remove server after downloaded.
- only download specify filename
- auto upload file from local to SFTP remote server and delete local folder file after uploaded
- only upload specify filename
... (3 Replies)
Hi,
I am migrating few of the shell scripts from existing SUN Solaries to AIX.
My script contains some command like 'dos2unix' and 'unix2dos' which are not compatible in AIX flavour. Please let me know if there is any such commands in AIX which can replace these commands.
Thanks. (1 Reply)
Hi,
Can anybody help mw how to use 2 conditinal directives in makefile (with AND=&&), so far none of my tries succedded.
Getting this warning like below. I thought that C's && will work, but alas, played with (), spaces and etc..
and I have only GNU Make 3.80
ifeq ($(VAR1),15) &&... (4 Replies)
Pl. let me know whether Sun Solaris Server (Unix OS) is compatible with Windows Server or Vise Versa. Can i update the data first in Windows Server and then copied it to Sun Solaris Server or Vise Versa. (1 Reply)
Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP.
I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Wow I'm so zoned out I don't even know if I posted this question up already (I couldn't find it in my book marks or in "yesterday's" post).
My question is, I'm writing a korn script that does something like the following, but I don't yet completely understand the syntax. I need to check that... (16 Replies)
I am looking for a dual XEON or any dual CPU motherboard that can support Linux and Solaris at the same time. Does anyone have any idea?
I am now looking at the TYAN S2507T / TYAN S2505T / TYAN S2720, you guys have any clue?:confused: (6 Replies)