gnu-make

how to remedy mno cygwin error?

▼魔方 西西 提交于 2019-12-04 18:45:51
问题 I'm working on compiling a library in windows with GCC and Make. When I run make , I get the following error: unrecognized command line option '-mno-cygwin' I saw this post on SO, but it doesn't necessarily seem like the same issue, and I don't understand how to downgrade my system to a version of GCC (or Make) that supports the flag I need to use in order to compile. Could someone please try to point me in the right direction, or if you've run into this problem offer a solution? I'm running

How to determine a good value for --load-average using gnu Make?

我与影子孤独终老i 提交于 2019-12-04 18:13:58
问题 In Make this flag exists: -l [load], --load-average[=load] Specifies that no new jobs (commands) should be started if there are others jobs running and the load average is at least load (a floating-point number). With no argument, removes a previous load limit. Do you have a good strategy for what value to use for the load limit ? It seems to differ a lot between my machines. 回答1: Acceptable load depends on the number of CPU cores. If there is one core, than load average more than 1 is

How to handle shell expansions in GNU Make under Ubuntu?

女生的网名这么多〃 提交于 2019-12-04 17:11:30
问题 Given this very simple Makefile : all: @mkdir -pv test/{a,b} I get this output on OS X 10.6.8 and CentOS 5.5: mkdir: created directory `test' mkdir: created directory `test/a' mkdir: created directory `test/b' But on Ubuntu 11.04 I get this: mkdir: created directory `test' mkdir: created directory `test/{a,b}' Running the command mkdir -pv test/{a,b} manually in the shell on all platforms gives the expected result. The version of GNU Make is the same on all platforms: GNU Make 3.81 Copyright

How to copy a directory in a Makefile?

人走茶凉 提交于 2019-12-04 16:39:50
问题 I have a directory images/ that I want to copy to build/images/ from within a Makefile. The directory might contain multiple levels of subdirectories. What would be the most elegant way to do that? I want: avoid a full directory copy on each make run (i.e. no cp -r ) guaranteed consistency (i.e. if a file changed in images/ it should be automatically updated in build/images/ ) avoid to specify a rule for each image and each subdirectory in the Makefile solve the issue within make , so no

How to check if a file exists in a makefile

不打扰是莪最后的温柔 提交于 2019-12-04 16:26:42
问题 I have a makefile template to compile a single DLL (for a plugin system). The makefile of the user looks like this: EXTRA_SRCS=file1 file2 include makefile.in In the makefile.in I have: plugin.dll: plugin.os $(patsubst %,%.os,$(EXTRA_SRCS)) Where plugin.os is the main C++ file to be compiled. Btw, the files ending is .os are the object files compiled for shared library (i.e. using the -fpic option with gcc ) Now, the problem is that the extra sources will probably (but not necessarily) be

xdebug.so: undefined symbol: zend_ce_error

二次信任 提交于 2019-12-04 14:41:40
I need debug old php version: PHP 5.6.22 (cli) (built: Jun 29 2016 14:26:09) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies On Ubuntu: Ubuntu 16.04 LTS I compiled appropriate PHP, and checked out xdebug from git repository: git://github.com/xdebug/xdebug.git I tried different versions, but just master seems compiling. In my errors I have: Failed loading /usr/share/php53/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so: /usr/share/php53/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so: undefined symbol: zend_ce_error I know that

GNU make with many target directories

南楼画角 提交于 2019-12-04 13:47:53
问题 I have to integrate the generation of many HTML files in an existing Makefile . The problem is that the HTML files need to reside in many different directories. My idea is to write an implicit rule that converts the source file (*.st) to the corresponding html file %.html: %.st $(HPC) -o $@ $< and a rule that depends on all html files all: $(html) If the HTML file is not in the builddir make doesn't find the implicit rule: *** No rule to make target . If I change the implicit rule like so $

Where is __LP64__ defined for default builds of C++ applications on OSX 10.6?

左心房为你撑大大i 提交于 2019-12-04 13:42:14
问题 I am building a 3rd-party library in 32-bit mode on OSX 10.6 (the library is Xerces 2.8). I have determined that the preprocessor definition __LP64__ is set. However, as far as I can see it is not being set within any configuration files of the 3rd-party project, and doing a global search through all files (via the Finder) for #define __LP64__ does not reveal to me where this is being defined by the system. I am building the library via make at the command line (Xcode is not involved). I

Using Makefile to clean subdirectories

让人想犯罪 __ 提交于 2019-12-04 12:53:13
问题 Is it possible to perform a make clean from the parent directory which also recursively cleans all sub-directories without having to include a makefile in each sub-directory? For example, currently in my Makefile, I have something like: SUBDIRS = src, src1 .PHONY: clean subdirs $(SUBDIRS) clean: $(SUBDIRS) rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c $(SUBDIRS): $(MAKE) -C $(SUBDIRS) clean However, this requires me to have a Makefile in both src and src1. Otherwise, I would get the error No

Number of parallel build jobs in recursive make call

三世轮回 提交于 2019-12-04 09:24:06
I have a makefile which wraps the real build in a single recursive call, in order to grab and release a license around the build, regardless of whether the build succeeds. Example: .PHONY main_target main_target: @license_grab & @sleep 2 -@$(MAKE) real_target @license_release This works great, until I want to run the make in parallel. On some systems it works fine, but on other systems I run into the documented problem with the -j flag when passing options to a sub-make : If your operating system doesn’t support the above communication, then ‘-j 1’ is always put into MAKEFLAGS instead of the