Compiling bootstrap less shows errors/warnings - twitter-bootstrap-3

I've a large project using Bootstrap3 CSS Framework. We use Netbeans IDE which supports less compile on save. Netbeans is using the syntax
Using lessc Version 2.4.0 on a Ubuntu machine installed via npm.
$ lessc less/compiled.less css/compiled.css
Full output:
"/usr/local/bin/lessc" "--source-map" "--source-map- rootpath=../themes/bodensee/less" "--source-map-url=compiled.css.map" "/usr/local/vufind2/themes/bodensee/less/compiled.less" "/usr/local/vufind2/css/compiled.css"
extend ' .clearfix' has no matches
extend ' .clearfix' has no matches
extend ' .clearfix' has no matches
extend ' .btn-xs' has no matches
extend ' .btn-sm' has no matches
extend ' .btn-lg' has no matches
extend ' .clearfix' has no matches
extend ' .clearfix' has no matches
extend ' .clearfix' has no matches
extend ' .clearfix' has no matches
extend ' .clearfix' has no matches
extend ' .clearfix' has no matches
extend ' .img-responsive' has no matches
extend ' .clearfix' has no matches
extend ' .clearfix' has no matches
extend ' .img-responsive' has no matches
extend ' .clearfix' has no matches
Done.
I dont't know what kind of errors they are., but I find them annoying. When I try using another syntax
$ lessc less/compiled.less > css/compiled.css
it suddenly works without these messages. Netbeans offers no way to change the syntax. Anybody knows a solution?

Also see: https://github.com/less/less.js/issues/2449
Less seems to threw an error when the code contains #media declaration in the main scope. As far i understand this error (warning) does not influence the extending itself.
You could safely run less with the --silent option to suppress this warning.

I had this problem with a Django app, and adding this to my settings file fixed the problem:
PIPELINE_LESS_ARGUMENTS = '-s'

Related

Stop CMake from prepending `lib` to library names

Sadly, CMake follows the awkward "implicit lib" convention, which inevitably causes problems when library names don't actually follow the convention (e.g. zlib), or have 'lib' as an explicit part of their name.
For example, suppose I want to add libusb:
add_library(libusb ...)
On Windows this will correctly produce libusb.lib. On Unix it will produce the hilarious liblibusb.a. Is there any way to prevent this behaviour? I know I can set the output name explicitly using OUTPUT_NAME but I'd have to use some funky generator expressions to preserve libusb.lib on Windows. I wonder if there is a better way?
(And no add_library(usb ... is not a solution; the library is called libusb not usb.)
You can modify it via CMAKE_STATIC_LIBRARY_PREFIX. So in your case just do after your project() command:
set(CMAKE_STATIC_LIBRARY_PREFIX "")
Or you can change it per target via the PREFIX target property.

Can GNU make execute a rule whenever an error occurs?

This is slightly different from Can a Makefile execute code ONLY when an error has occurred?.
I'd like a rule or special target that is made whenever an error occurs (independent of the given target; without changing the rule for every target as the other answer seems to imply with the || operator).
In dmake there is special target .ERROR that is executed whenever an error condition is detected. Is there a similar thing with GNU make?
(I'm still using GNU make 3.81, but I didn't find anything in the documentation of the new GNU make 4.0 either)
Gnu doesn't support it explicitly, but there's ways to hack almost anything. Make returns 1 if any of the makes fail. This means that you could, on the command line, rerun make with your error rule if the first make failed:
make || make error_targ
Of course, I'll assume you just want to put the added complexity within the makefile itself. If this is the case, you can create a recursive make file:
all:
$(MAKE) normal_targ || $(MAKE) error_targ
normal_targ:
... normal make rules ...
error_targ:
... other make rules ...
This will cause the makefile to try to build normal_targ, and iff it fails, it will run error_targ. It makes it a bit harder to read the makefile for the inexperienced, but it puts all the logic in one place.

library versioning with cmake

I have a project with 4 different sub projects. To specify the versions, I use the
SET(parent_VERSION_MAJOR 1)
SET(parent_VERSION_MINOR 0)
set(parent_VERSION_PATCH 0)
set(parent_VERSION 1.0.0)
and then I can use this in the sub projects if the add_subdirectory is used.
Q1. I could not set parent_VERSION based on MAJOR, MINOR and PATCH. According to the documentation is should be set automatically but whenever I try printing it, it is empty without using the last line in the code.
Q2. In case I want to build from sub directory only, I get an error shouting :
CMake Error at CMakeLists.txt:28 (set_target_properties):
set_target_properties called with incorrect number of arguments.
which is because I am using parent_VERSION there.
So I understand that it isn't able to get the parent_VERSION without running cmake from the top directory but how do I change the code such that it can build even without running from the top level.
I read about SET with INHERITED but I don't think that is what I need.
Here is how I solved it. If someone could tell me a better/more elegant way I'd be happy.
if(NOT parent_VERSION)
SET(parent_VERSION_MAJOR 1)
SET(parent_VERSION_MINOR 0)
SET(parent_VERSION_PATCH 0)
SET(parent_VERSION 1.0.0)
endif(NOT parent_VERSION)

How can I write installation path to registry with custom delimiter in WiX?

I would like to write a value to registry which consists of installation path and some additional path. Delimiter must be '/', e.g.
Value="[INSTALLLOCATION]/folder1/folder2"
How can I format this value so that installation path will be also with '/' delimiter instead of '\'?
MSI formatting doesn't support this. You'd have to write a custom action that read the property, reformatted the string and wrote it to a new property ( INSTALLLOCATIONFORMATTED) then you could use that property in the Registry table.
The bigger question and simpler answer though is .... "why?"
Are you doing something like file://c:/foo/bar.txt ?
file://C:\foo\bar.txt should work also as \ is the standard on the Windows Platform. It's probably better that whatever code reads this registry value be modified to accept \ instead of /. This results in a simpler and less fragile installer.

Comparing string variables in a makefile

I have code that looks like the following (below) where ${IMPJAVASRC:T} evaluates to PJCentric.java. I would like to compare this string variable to a prefix consisting of just the characters "PJC" since there are other modules with the same prefix which I would like to compile with a different -classpath than other modules that start with a different prefix. However, my statement below does not evaluate to true. Any suggestions?
.if !empty(${IMPJAVASRC:T}:MPJC*)
(compile one way)
.else
(compile another way)
You probably can do this if you use specifically GNU Make e.g. with its conditional functions or its control functions. But other make programs don't give you this ability. However, there also exist better building programs than make such as omake and Java have also ant