Not long ago, Mr. Zhu asked me to write a spec
I haven’t written about spec before. I don’t know what it is. I checked a lot of blogs about spec on the Internet. I encountered many pits, but the biggest pit was make install in the% install part
The information on the Internet says:
This segment is the install segment, which contains commands that will be executed when installing packages, such as the make install command. %makeinstall This is not a keyword, but a standard macro command defined by rpm. It can also be written in a non-standard way: quoting make DESTDIR=$RPM_BUILD_ROOT install or quoting make prefix=$RPM_BUILD_ROOT install It should be noted that %install here is mainly for the %file that follows. So, you can also use the regular system commands: quote install -d $RPM_BUILD_ROOT/ cp -a * $RPM_BUILD_ROOT/
But every time I use make install, I will report an error: Make: * * * no rule to make target ‘install’. Just write install – d instead. I don’t understand why
Later, it was found that use make install on the premise that the makefile has been written. The install in the error report is actually the written target in the makefile
For example, it is written in makefile as follows:
install-oem: mkdir -p $(LIBDIR)/xsconsole/plugins-oem
You can write this in% install:
%install make install-oem DESTDIR=$RPM_BUILD_ROOT
Otherwise, of course, an error will be reported and the target cannot be found
Mr. Zhu said that using makefile is a little out of date now. I think makefile is very annoying. If it is wrong, I have to repackage it and generate a compressed file. After many changes, I can’t stand it at all. It’s better to write content directly in% install, which is also convenient to change
Similar Posts:
- Make Command ERROR: “make:*** No targets specified and no makefile found.Stop.” [Three Method to Solve]
- Eclipse C/C++ Error: launch failed,binary not found
- [Solved] Ruby cannot load such file — zlib, openssl(LoadError), gem No rule to make target `/include/ruby.h’
- [Solved] aarch64-none-elf-gcc: fatal error: cannot execute ‘cc1’: execvp: No such file or directory
- [Solved] NFS Failed to mount: Nothing Happened or “No such device” Error
- Tips the solution of bash: Make: command not found
- CentOS prompt – bash: Make: command not found solution
- Makefile:xxx: recipe for target ‘xxx’ failed
- [Solved] Python OSError: Could not find lib geos_c.dll or load any of its variants
- linux: make: gcc: Command not found [How to Solve]